Subject: Re: Default file permissions...
To: James K. Lowden <jklowden@schemamania.org>
From: Brian A. Seklecki <lavalamp@spiritual-machines.org>
List: netbsd-help
Date: 02/06/2002 01:55:04
On Tue, 5 Feb 2002, James K. Lowden wrote:

> On Tue, Feb 05, 2002 at 08:14:41PM -0600, Brady 'C-Man' Owens wrote:
> > I was wondering how you change the default file permissions for when a user
> > writes a file to the drive?
>
> Brady,
>
> It's a shell built-in, controlled by .profile in the case of /bin/sh.
>
> You can see what it's set to:
>
> 	$ umask
> 	0022
>
> and try 'man umask' to understand the meaning of the mask.

...in addition to RTFM:

...try adding a umask statement to /etc/csh.cshrc (system wide of all csh
style shells) and /etc/profile (system wide for all bourne style shells).

...and _most_ shops are setting default user umask's to 077 these days.
The exception is when you're serving content to a daemon (like apache) out
of the users homedir, in which case, certain subdirectories need to be
755, but in that case, it's best to use symlinks to another filesystem or
group permissions.

*NOTE* : If you use 077, watch your root shells in combination w/pkgsrc.
Make sure you "su -" instead of "su", and make sure root has a custom
~/.profile or ~/.cshrc (once again, depending on root's shell)

-lava

>
> Regards,
>
> --jkl
>

--Brian

 ----

"GNU/Linux: About as stable as the elements at the bottom of the periodic
table"