Strange umask behavior

Adrienne J Davis dreadgeek at gmail.com
Wed Jun 13 00:29:43 UTC 2007


Thanks Brad.  We were trying to figure out what the behavior was.

Cheers
Aj

At 11:45 12-06-07, you wrote:
>On 6/12/07, Adrienne J Davis <dreadgeek at gmail.com> wrote:
> > A colleague of mine at work asked me to do the following:
> >
> > umask 000
> > touch foo.sh
> > ls -l foo.sh
> >
> > What we expected was that the permissions would be set 777, but they were
> > set 666.  Does anyone have any ideas as to why this might be?
> >
> > Cheers
> > Aj
>
>You have to remember that umask does a bitwise AND with 666 when
>creating files and 777 when creating directories.  That's the default
>file creation behavior for Linux and UNIX.
>
>So, if you had created a directory, you would have seen 777 but a file
>will only get 666 at best.  If you want 777 for a file, you have to
>chmod it.
>
>Brad.
>
>--
>kubuntu-users mailing list
>kubuntu-users at lists.ubuntu.com
>Modify settings or unsubscribe at: 
>https://lists.ubuntu.com/mailman/listinfo/kubuntu-users

Aj Davis -- Dreadlocked Science Geek
YIM: ladyfractal PGP Key available
The voice of Reason is soft.  But it is very 
persistent.  (Christopher Hitchens) 





More information about the kubuntu-users mailing list