Subject: Re: Default file permissions...
To: Brady 'C-Man' Owens <brady@fastglass.net>
From: Andy R <quadreverb@yahoo.com>
List: netbsd-help
Date: 02/05/2002 19:51:09
--- Brady 'C-Man' Owens <brady@fastglass.net> wrote:
> I was wondering how you change the default file
> permissions for when a user 
> writes a file to the drive?
> 
> Thanks!
> Brady

JKL already replied, but I'll add one more thing.
Usually a user umask is something like 022 (the first
0 is usually implied so they don't always write it as
0022, although it's worth knowing what the first zero
does).

So if you chmod a file to let's say, 755, you get
rwxr-xr-x right? Well, the umask is the opposite of
that. 022 "masks" those last numbers. You get 755
because 777 "minus" 022 is 755. Kinda sorta anyway.
That's the way I learned it. On my account on a big
unix server, I set my umask to 177 so nobody else
would be able to see my stuff. It's a pain sometimes,
but it keeps out the snoopers.

Andy 


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com