mount as ro for users, rw for root?
Sabuj Pattanayek
sabujp at gmail.com
Fri Dec 12 20:00:39 CST 2008
Hi,
On Fri, Dec 12, 2008 at 3:27 PM, Scott R. Ehrlich <scott at mit.edu> wrote:
> Under CentOS/RH 5.2, is it possible to mount an iscsi filesystem/partition
> as rw for root, but ro for users?
Not in the same location, you would have to use regular unix perms for
dirs and files under your filesystem as someone else mentioned. If you
don't want to change all the permissions you could have two
mountpoints. In one mount point you could just use the ro option and
mount it read only and mount this under a directory which has read
access for everyone so that everyone can access the ro mountpoint
below, e.g.:
mkdir -p /everyone/foo
mount -t fstype -o ro /dev/somedev /everyone/foo
In the other mount point for root as rw :
mkdir -p /rootOnly/foo
chown root:root rootOnly
chmod 700 /rootOnly
mount -t fsType /dev/somedev /rootOnly/foo
HTH,
Sabuj Pattanayek
More information about the Linux-PowerEdge
mailing list