Ftp – Unable to sunchronize local and remote directories (“set times: Operation not permitted”)

fedoraftppermissionssynchronizationunix

I'm running into FTP errors using software like NetBeans or WinSCP: whenever I attempt to perform a synchronization or update of files from local –> server I get errors on the client saying "set times: Operation not permitted".

This is clearly an issue with the way I've configured my Fedora installation. The user that I'm logging in with cannot touch -t any of these files, though he IS part of a group that has r/w access on the files.

I do have root / sudo access to this server. What I would like to know is:

a) is it likely that this problem would be solved by allowing my FTP user to "touch -t" these files
b) how do I enable a certain user to be able to set timestamps on files without giving them ownership of the files (certain of these files need to be owned by Apache, for instance, so I don't want to chown them).

Thanks in advance.

Best Answer

I guess, I am a bit late, but maybe someone stumbles upon this question as I did. So here we go...

As explained before by mgorven, if your FTP user does not own the files he cannot modify the timestamp to an arbitrary time (there is also a rather detailed answer here).

Now for WinSCP: you can disable the option "Preserve timestamps" under Options -> Preferences... -> Transfer. You can do the same for all your transfer profiles. Now WinSCP will not try to set modification times any more but it will just use the upload time instead (so this does not change any behavior but just gets you rid of the error messages). However, this will only work for single file uploads. Both the synchronization and the monitoring feature will ignore this setting if you set the comparison criterion to modification time (which Martin Prikryl confirmed here). And right now, unfortunately, there is nothing you can do about having to click away all those error messages when synchronizing.

Because I like to use both synchronization and monitoring (and especially the monitoring feature is actually more broken with the option enabled), I filed this feature request. Until that is accepted and implemented, I'm afraid, there is no practical no way to get rid of the error messages.

Related Topic