mount as ro for users, rw for root?

Matt Domsch Matt_Domsch at dell.com
Sat Dec 13 23:11:26 CST 2008


On Fri, Dec 12, 2008 at 08:00:39PM -0600, Sabuj Pattanayek wrote:
> 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


multiply mounting a NFS export is OK.  Multiply mounting an iSCSI
volume (a LUN, seen as a disk to Linux) is really bad, unless you're
using a cluster-aware file system on it, such as GFS.

-- 
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux



More information about the Linux-PowerEdge mailing list