Parallels & ProFTPD
In preparation for basically replacing every file on-site, I thought it might be a good idea to go take a backup. I notice the Personal FTP Repository Settings are conspicuously absent in my swanky new Parallels backup section. Hmmm. Manual Backups, eh. That won't do.I vaguely remember leaving a note somewhere to come back to this and so I check my notes. Right enough, there's some issue with Parallels and the login with my local FTP server. Automatic backups are not happening. Old Parallels still works fine on my test server. New parallels refuses. Of course I had Googled this issue, which apparently affects betaFTP as well as ProFTPD.
The gist was that Parallels support were looking into it, and I had cannily decided to shelve the issue for a month or two, come back when they had figured it out. So I googled again. And of course, as its Parallels support, those affected are still waiting. I decide to investigate..
Five minutes later I have the solution, and of course it's a permissions problem.
New Parallels in its infinite cleverness begins an FTP session doing stuff like this..
"USER someuser" 331 -
"PASS (hidden)" 230 -
"PWD" 257 -
"CWD upload" 250 -
"PASV" 227 -
"TYPE A" 200 -
"NLST" 226 0
"CWD /" 250 -
"CWD upload" 250 -
"CWD check0" 550 -
"MKD check0" 257 -
"CWD check0" 250 -
"PASV" 227 -
"LIST" 226 0
"CWD /" 250 -
"CWD upload" 250 -
"CWD check0" 250 -
"PASV" 227 -
"TYPE I" 200 -
"STOR test" 226 4
"PASV" 227 -
"TYPE A" 200 -
"NLST" 226 5
"PASV" 227 -
"TYPE I" 200 -
"SIZE test" 550 -
"RETR test" 550 -
OK, basically it logs in and creates a test folder and a test file within. That's fine. Anyone can create anything in the uploads folder. That's the point. By the way, good idea!
But at this point the FTP "communication" fails, and Parallels will tell you that you have messed up somehow and should think twice before once again wasting its time, or more accurately, "FTP connection failed, please check your FTP settings, dimwit!". Okay, I added the dimwit part.
I think twice, and then enable every permission under the sun, restart my FTP server, try again. This is when I realize that Parallels' next move, is this..
"PASV" 227 -
"TYPE A" 200 -
"NLST" 226 5
"DELE test" 250 4
"CWD /" 250 -
"CWD upload" 250 -
"PASV" 227 -
"LIST" 226 124
"RMD check0/" 250 -
"QUIT" 221 -
"USER someuser" 331 -
"PASS (hidden)" 230 -
"PWD" 257 -
"CWD upload" 250 -
"PASV" 227 -
"TYPE A" 200 -
"LIST" 226 62
"QUIT" 221 -
Here we can see the wonderful Parallels goes on to delete the test folder. This is not okay, not in anyone's dropbox! We must assume that Parallels does not like the response it gets from the ftp server when it attempt this highly suspicious action.
Obviously, those who already have insane permissions on their FTP uploads directory do not experience the issue*. And those with normal, sane permissions on their uploads directory will need to enable insane permissions if they want Parallels to work with it!
Whether this is required past the initial setup stage is undefined at the moment - I have another Parallels issue at the server which prevents me from testing this.
So it may be possible to work around this by setting insane permissions for only a minute or two. If not, a script that checks for an immediately moves completed backups would definitely be in order!
I'll get back to you on this …
Indeed, it turns out that the insane permissions are only required for a couple of minutes, during setup. Thereafter Parallels will do automatic backups to your ftp repository with normal upload permissions. Problem solved!
While I'm here, I should mention that Parallels (or Parallels + ProFTPD) appears to have a limit on how big a backup it is willing to upload to your personal repository. Remote backups simply failed until I set the backup to split into 200MB chunks. Now it works flawlessly. Good to know.
for now..
;o)
references:
* Though probably do experience having their home server used as a dumping ground for 0day w4r3z and other, even less scrupulous content.
Checked your uploads folder lately?
Checked your uploads folder lately?