fstab question

Cameron Hutchison camh+ubuntu at xdna.net
Sun Jan 16 05:53:38 UTC 2005


Once upon a time Nicholas Pappas said...
> Simon Taplin wrote:
> 
> > What I need to change to give all users full access to this parition, 
> at this point I can only browse it as root.
> 
> 
> /dev/hdc5    /media/Backups    reiserfs defaults,users    0    0
> 
>     The "users" option.

The users option is typically used for removable media which mounted on
demand.

The fstab entry Simon provided did not have a "noauto" option so it
would have been mounted on boot. Non-root users would not be able to
unmount and remount it.

Simon, What you want has nothing to do with fstab. You need to change
the file permissions of the directory hierarchy, and possibly the
owner/groups. It will depend on what level of access to the partition
you want ordinary users to have.

The commands you are looking for are chmod(1) and chown(1).

As a start, to make the all files in the directory hierarchy readable to
everyone, but writable only to root, run the following commands as root:

# find /media/Backups -type d -print0 | xargs -0 chmod u=rwx,g=rx,o-rx
# find /media/Backups -type f -print0 | xargs -0 chmod g=u-w,o=u-w

In both these commands, the arguments "-print0" and "-0" contain zeros,
not capital O.

The first command will make all directories accessible and readable to
all, plus writable by the owner (which I assume is root).
The second command will make all ordinary files readable by all, and
executable by all if it is already executable by the owner (group and
other permissions are the same as owner permissions minus writability).

If you want to give some people write access and not others, you'll need
to use the group flags. Come back to the list if you need more info.





More information about the ubuntu-users mailing list