undesirable behaviour when copying to sshfs/sftp hosts

Jared Henley <[email protected]> Mon, 23 Jul 2012 08:34:17 +1000
Newsgroups gmane.comp.desktop.rox.devel
Message-ID <[email protected]>
Hi,

I use Rox-filer for all my file manager needs, and it does an awesome =

job. But recently
it's giving me trouble when copying to an sshfs mount. I typically get =

the following:

cp: failed to preserve ownership for =91sshfs/newfile2=92: Permission denied

This is not surprising, as rox appears to use "cp -p" to do the actual =

copy, and because
the UIDs of the source and target users are different, a chown is =

required, but fails
since regular users can't chown files.

The big problem is that the copied files are left with permissions of =

600. This is a security
feature of cp (I've already sent a message to the coreutils mailing =

list), but it causes me
trouble becase I need the permissions to be 660 in order to collaborate =

with a group.
Manually changing the permissions is possible, but is time-consuming and =

error-prone.

Can we either:

* change rox's invocation of cp to use plain old "cp" (which seems to =

preserve permissions
anyway, in my experience) or "cp --preserve=3Dmode"

or

* add an option to either enable the above, or use the existing default =

behaviour.

I can probably supply a patch for the first option, if it's the way to go.

Regards,
Jared Henley


---------------------------------------------------------------------------=
---
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and =

threat landscape has changed and how IT managers can respond. Discussions =

will include endpoint security, mobile security and the latest in malware =

threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/