D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] sshfs new file permissions

 

Grant Sewell wrote:
On Fri, 18 Sep 2009 14:23:26 +0100
Kevin Bailey wrote:


Simon Williams wrote:
Hi everyone.
I've been using sshfs for a few weeks, and have just realised that it's been creating all my files with permissions 600 or 700. This
is not helpful when I'm editing websites!

I tried the umask option to sshfs, but that did completely the
wrong thing.
Isn't umask AND'd to the permissions - i.e. a umask of 022  will
result in permissions set to 755 - i.e. take umask away from 999.

Like I said- the umask option to sshfs works like the umask option to VFAT and other non-unixy filesystems- it sets the files to exactly that permission. For example, when I had a FAT32 drive I mounted it with uid=1000, gid=100, umask=022. This gave every file uid 1000, gid 100, and permissions 755 *EXACTLY*- not masked with anything. Try mounting a VFAT device and you'll see what I mean.

Maybe you didn't believe me because it's absolutely stupid behavior for sshfs, but amazingly this is what it does. And there is no option for the sane 'umask command' type behaviour.

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html