[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12014: cp -p fails to preserve permissions on sshfs
From: |
Jared Henley |
Subject: |
bug#12014: cp -p fails to preserve permissions on sshfs |
Date: |
Fri, 20 Jul 2012 09:10:31 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120616 Thunderbird/13.0.1 |
These days I'm frequently using sshfs to access a remote server running
Linux.
I like to use Rox-Filer, which copies files using "cp -p". I always get
permission
denied errors trying to change ownership, which is expected. But then the
permissions of the copied file are always 600, which causes problems
since the
files need to be group-readable. The umask on the server is 002.
Below is some test output to demonstrate what happens.
address@hidden ~]$ sshfs address@hidden:/home/ja sshfs
address@hidden's password:
address@hidden ~]$ touch sshfs/newfile
address@hidden ~]$ ls -l sshfs/newfile
-rw-rw-r-- 1 ja ja 0 Jul 20 08:35 sshfs/newfile
address@hidden ~]$ touch newfile2
address@hidden ~]$ cp -p newfile2 sshfs
cp: failed to preserve ownership for ‘sshfs/newfile2’: Permission denied
address@hidden ~]$ ls -l sshfs/newfile2
-rw------- 1 ja ja 0 Jul 20 08:36 sshfs/newfile2
address@hidden ~]$ rm sshfs/newfile2
address@hidden ~]$ cp newfile2 sshfs
address@hidden ~]$ ls -l sshfs/newfile2
-rw-rw-r-- 1 ja ja 0 Jul 20 08:37 sshfs/newfile2
Is there some security reason why the permissions fall back to 600 when the
chown fails, or is this a bug?
Jared Henley
- bug#12014: cp -p fails to preserve permissions on sshfs,
Jared Henley <=