xfs
[Top] [All Lists]

Re: setting uid and gid of mount point

To: Timothy Ball <timball@xxxxxxx>
Subject: Re: setting uid and gid of mount point
From: Timothy Shimmin <tes@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 26 Apr 2001 16:21:35 +1000
Cc: XFS Mailing List <linux-xfs@xxxxxxxxxxx>
In-reply-to: <20010425153909.Q18581@xxxxxxxxxxxx>; from timball@xxxxxxx on Wed, Apr 25, 2001 at 03:39:09PM -0400
References: <20010425153909.Q18581@xxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi Tim,

On Wed, Apr 25, 2001 at 03:39:09PM -0400, Timothy Ball wrote:
> How do I set the uid, umask, gid of a xfs mount point? 

Hmmm....this question seems to be a bit confused...
You can set the uid owner and gid group of a file with
chown(1) (and chgrp(1)).
The umask is associated with a process and not an inode.
This can be set for a process with umask(1).
If you want the inode to have its execute permission
bits taken away and "other" have write permission taken away
as well then you need a umask of 113 - i.e. its subtractive. 
e.g. mode &= ~current->fs->umask

> I would like have
> /dev/sda1 to be mounted w/ cvsuser as the uid and devel as the gid. and
> have a umask of 664 (that way files can't be executed.) I've looked at
> chacl but the man page is less than clear, (at least to me).
> 
chacl(1) is for changing the Access Control List (ACL) on a file/dir 
(see acl(5)).
You can achieve a similar thing by associating a default ACL
with the top level directory.
When this is done, files/dirs below the dir are created with
permissions of the requested mode AND'ed with the default ACL
(and the umask is ignored). Also the new file has the corresponding
access ACL associated with it.

--Tim

<Prev in Thread] Current Thread [Next in Thread>