Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

setting umask for an nfs mount

1,913 views
Skip to first unread message

Shri Shrikumar

unread,
Sep 24, 2003, 8:10:09 AM9/24/03
to
Hi,

I need different umasks for different nfs mounts and the mount page does
not give any help since nfs doesnt seem to have the umask option.

Any ideas on what I could do to acheive this ? BTW, I am running testing
/ unstable.

Best wishes,

Shri
--
------------------------------------------------------------------------
Shri Shrikumar U R Byte Solutions Tel: 0845 644 4745
I.T. Consultant Edinburgh, Scotland Mob: 0773 980 3499
Web: www.urbyte.com Email: sh...@urbyte.com

signature.asc

Mark Ferlatte

unread,
Sep 24, 2003, 10:10:16 AM9/24/03
to
Shri Shrikumar said on Wed, Sep 24, 2003 at 01:00:25PM +0100:

> Hi,
>
> I need different umasks for different nfs mounts and the mount page does
> not give any help since nfs doesnt seem to have the umask option.
>
> Any ideas on what I could do to acheive this ? BTW, I am running testing
> / unstable.

The umask is a per-process setting, not a per mount setting.

What are you trying to accomplish?

M

Shri Shrikumar

unread,
Sep 24, 2003, 11:50:21 AM9/24/03
to
On Wed, 2003-09-24 at 15:05, Mark Ferlatte wrote:
> The umask is a per-process setting, not a per mount setting.
>
> What are you trying to accomplish?

I have the following directory structure

~/
src/
shared/

What happens now is that wherever I create a file, its created with
-rw-rw---- permissions. What I would like is for all files in share to
be created with the permissions of -rw-rw-r--

man mount tells me that some filesystems support setting a umask for the
mount like hpfs, ntfs, and udf.

If not with mount, is there another way of accomplishing this ?

Thanks and best wishes,

signature.asc

Colin Watson

unread,
Sep 26, 2003, 3:40:14 AM9/26/03
to
On Wed, Sep 24, 2003 at 07:05:30AM -0700, Mark Ferlatte wrote:
> Shri Shrikumar said on Wed, Sep 24, 2003 at 01:00:25PM +0100:
> > I need different umasks for different nfs mounts and the mount page does
> > not give any help since nfs doesnt seem to have the umask option.
> >
> > Any ideas on what I could do to acheive this ? BTW, I am running testing
> > / unstable.
>
> The umask is a per-process setting, not a per mount setting.

There is a 'umask' mount option that's used for FAT filesystems because
they're too weak to support Unix-style permissions. It shouldn't be
necessary for NFS, though - just change the permissions on disk, surely?

--
Colin Watson [cjwa...@flatline.org.uk]


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Andre Kalus

unread,
Sep 26, 2003, 8:40:05 PM9/26/03
to
On Wed, 24 Sep 2003 16:45:59 +0100, Shri Shrikumar wrote:

> On Wed, 2003-09-24 at 15:05, Mark Ferlatte wrote:
>> The umask is a per-process setting, not a per mount setting.
>>
>> What are you trying to accomplish?
>
> I have the following directory structure
>
> ~/
> src/
> shared/
>
> What happens now is that wherever I create a file, its created with
> -rw-rw---- permissions. What I would like is for all files in share to be
> created with the permissions of -rw-rw-r--
>

Having the same problems here. Solved it by writing a script setperms.sh
that sets the correct permissions. This script can be called by a cron
job. Not a nice solution but I found no better.

Greetings
Andre

Shri Shrikumar

unread,
Sep 27, 2003, 4:30:18 PM9/27/03
to
On Wed, 2003-09-24 at 15:18, Colin Watson wrote:
> On Wed, Sep 24, 2003 at 07:05:30AM -0700, Mark Ferlatte wrote:
> > Shri Shrikumar said on Wed, Sep 24, 2003 at 01:00:25PM +0100:
> > > I need different umasks for different nfs mounts and the mount page does
> > > not give any help since nfs doesnt seem to have the umask option.
> > >
> > > Any ideas on what I could do to acheive this ? BTW, I am running testing
> > > / unstable.
> >
> > The umask is a per-process setting, not a per mount setting.
>
> There is a 'umask' mount option that's used for FAT filesystems because
> they're too weak to support Unix-style permissions. It shouldn't be
> necessary for NFS, though - just change the permissions on disk, surely?

Yes, but its annoying because, each time a new file is create or cvs
commit is done, all the permissions reset based on the umask and I have
to run chmod again.

Anybody have any solutions for this cos I am very close to writing a
setperms cron job as suggested by Andre.

signature.asc
0 new messages