sftp permission bug when creating new files

The Cyberduck forums have moved to Google Groups, this forum is read only.
Locked
westside_guy
Harmless
Posts: 4
Joined: Fri Jun 03, 2005 9:24 pm

sftp permission bug when creating new files

Post by westside_guy »

Hi,

I've found something odd with cyberduck 2.4.6 and 2.5beta. I have turned off "adjust file permissions" for both downloading and uploading. If I'm overwriting an existing file this behaves as expected - the permissions on the file are left alone. However if I am moving a file over to the server that does not already exist, it is created with permissions set to 000!

It seems like the correct thing to do would be either to create the new file with the same permissions that it has on my local machine, or else set them to match the umask. But setting them to 000 is certainly not correct.

Thanks.
User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: sftp permission bug when creating new files

Post by boredzo »

westside_guy wrote:I have turned off "adjust file permissions" for both downloading and uploading. If … I am moving a file over to the server that does not already exist, it is created with permissions set to 000!
I just had the same problem, and after much research (including the Trac and this forum), figured out the solution.

You must turn ON “Adjust file permissions on upload”; this tells Cyberduck to change the permissions of the remote file, rather than leaving them at their default value at the time of the file's creation. Leave the “Use default permissions” off; this checkbox, when on, tells Cyberduck to use the provided permissions rather than the permissions of the local file.

So, “Adjust file permissions on upload” on, “Use default permissions” off, and the problem is solved.
westside_guy
Harmless
Posts: 4
Joined: Fri Jun 03, 2005 9:24 pm

That's problematic

Post by westside_guy »

Thing is, if I do that then it'll keep resetting the permissions on existing files I update with Cyberduck. That's a much more common scenario than uploading brand new files, and on our Unix server (and probably most others as well) it's not a good idea. We have some files that are "world" readable, but also other files with very specific user and group ownerships - there's not a good one-size-fits-all permission that covers all situations. That's the whole point of the Unix-type permissions system.

Most all applications, when creating a new file, will honor the umask when deciding what permissions to set when creating a new file. I don't really understand why Cyberduck doesn't do this.
Locked