Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2008 16:45:58 -0800
From:      Andrew Bradford <a-bb@gmx.net>
To:        freebsd-questions@freebsd.org
Subject:   Mounting FS read-only for specific user (or root)
Message-ID:  <47BCC9C6.9050501@gmx.net>

index | next in thread | raw e-mail

Hi all,

I'm trying to set up a mounted filesystem that is read-write for root, 
but read-only for anyone else.  It will be mounted as a backup 
directory, so files listed in that directory will be owned by current 
users on the system but can't be writeable, regardless of the file 
permissions.

Example
<normal filesystems mounted from hd1>
hd2 mounted rw in /root/backup-rw
hd2 mounted ro in /backups

Only root should be able to write to anything under /root/backup-rw/ 
even though normal users will own files in that directory.  Normal users 
should be able to read anything that permissions allow in /backups so 
that they can restore files from the backup.

I was planning on using the nullfs fs type to achieve the second 
mountpoint for the fs.

Is this possible?

Thanks,

Andrew



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47BCC9C6.9050501>