[sclug] fstab and shfs

Damion Yates damiony at is.bbc.co.uk
Tue Nov 1 12:42:18 UTC 2005


On Tue, 1 Nov 2005, Peter Brewer wrote:

> Another problem for the collective SCLUG brain.....
>
> We are trying to set up shfs to access data on our fileserver.  All
> works fine when we try to mount manually using a command like:
>    -  shfsmount foouser at barhost:/data /data
>
> but what we really want is to use fstab so it mounts on boot.  We added
> the following line to fstab:
>    -   foouser at barhost:/data      /data shfs   defaults     0  0

Where you have "default" you can use a whole set of "," separated
options such as uid=XXX and umask=XXX so that the mount permits users
to read/write.  But of course you'll be limited to whatever
foouser at barhost:/data has permission to do.  As the mount -a at boot
runs as root, it's root that ssh'ed to barhost albeit as user foouser,
this may not be exactly what you want, it could make more sense to use
the "user" parameter in the fstab and have users automount at login
for parts of the filesystem they need.  If RO is all you want this
this should be fine.

> This works, but it mounts it as root so users can't access it.
> Permissions are as follows:
>    -   drwx------    1 root     root   512 Nov  1 12:18 data
>
> Anyone got any bright ideas?

shfs (http://shfs.sourceforge.net/) is an addon, but sshfs which is a
module for FUSE is in the latest kernel, it may be switching to that.
Should be the same functionality.

Thanks,

Damion

-- 
Damion Yates - email: Damion.Yates at bbc.co.uk - phone: +44 (0) 1628 407759
Siemens


More information about the Sclug mailing list