[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mount and permissions



William Lacy wrote:
  >Can I set up /etc/fstab so that anyone at the console can mount a given
  >filesystem, and also so that any user can write to these filesystems
  >automatically without executing "su"?

Add the option 'user' to allow any user to mount a filesystem.

Whether any user can write to a filesystem depends on the permissions of
its files and directories. You can _disable_ writing by adding the 'ro'
option.  For microsoft filesystems (msdos, umsdos, vfat), which do not
have any permissions in themselves, there is an option 'umask=value'. 
This is from mount(8):

	  umask=value
		    Set the umask (the bitmask of the permissions  that
		    are  not  present). The default is the umask of the
		    current process.  The value is given in octal.

so, mounting with default umask gives:

  # umask
  022
  # mount -t msdos  /dev/fd0 /mnt
  root@linda# ls -l /mnt
  total 6
  drwxr-xr-x   2 root     root          512 Jan  3  1992 asw-1410
  ...

but specifying a mask gives:

  # mount -t msdos -o umask=0 /dev/fd0 /mnt
  root@linda# ls -l /mnt
  total 6
  drwxrwxrwx   2 root     root          512 Jan  3  1992 asw-1410
  ...

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "Let nothing be done through strife or vainglory; but 
      in lowliness of mind let each esteem other better than
      themselves."      Philippians 2:3 



Reply to: