Subject: Re: Set owner/group on mount
To: Jan Danielsson <email@example.com>
From: Matthias Scheler <firstname.lastname@example.org>
Date: 03/26/2007 13:01:16
On Sun, Mar 25, 2007 at 09:33:29PM +0200, Jan Danielsson wrote:
> I want to set owner/group and permissions on a mount point as I
> mount. Something like:
> $ sudo mount -o setuid=jan,setgid=users,perm=750 /dev/cgd3a
That's only supported for filesystem which don't provide permissions
and user and group information like FAT filesystems (handled via
"mount_msdos"). If a filesystem provides such information (FFS, LFS,
NFS, ext2fs, etc.) that information is used. You can however use the
umap filesystem via "mount_umap" to remap user and group ids.
There are also the mount options "nodev" and "nosuid" which stop the
user from taking over a system by mounting a filesystem with setuid
or setgid binaries or world writable device nodes.
> Is it possible, or do I need to run chown and chmod separately after
> the mount?
That will work, too. You only have to do that once because the permissions
and the ownership will be stored.
P.S. "Cc:" and "Reply-To:" are set to "netbsd-users@NetBSD.org".
Matthias Scheler http://zhadum.org.uk/