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

Directory umask?

1 view
Skip to first unread message

MZ

unread,
Nov 23, 2009, 3:30:06 PM11/23/09
to
I'm puzzled. My umask setting in .cshrc is umask 22. It creates files
with permissions rwxrwxr-x. But directories are created with rwxr-xr-x.
I want the directories to be writable by others within the group. How
do I accomplish this? And why are directories created with different
permissions from files?

Lowell Gilbert

unread,
Nov 24, 2009, 7:46:43 AM11/24/09
to
MZ <ma...@nospam.void> writes:

I think you need to look at how you create files, not directories. As
far as directories go, that umask is acting correctly. It should forbid
the write bit for "group" and "other" permissions, on both files and
directories.

For example:
[1001] (lowell-desk) ~> umask 022
[1002] (lowell-desk) ~> touch baz
[1003] (lowell-desk) ~> ls -l baz
-rw-r--r-- 1 lowell family 0 Nov 24 07:44 baz
[1004] (lowell-desk) ~>

--
Lowell Gilbert, embedded/networking software engineer
http://be-well.ilk.org/~lowell/

MZ

unread,
Nov 24, 2009, 12:35:49 PM11/24/09
to
Lowell Gilbert wrote:
> MZ <ma...@nospam.void> writes:
>
>> I'm puzzled. My umask setting in .cshrc is umask 22. It creates
>> files with permissions rwxrwxr-x. But directories are created with
>> rwxr-xr-x. I want the directories to be writable by others within the
>> group. How do I accomplish this? And why are directories created
>> with different permissions from files?
>
> I think you need to look at how you create files, not directories. As
> far as directories go, that umask is acting correctly. It should forbid
> the write bit for "group" and "other" permissions, on both files and
> directories.
>
> For example:
> [1001] (lowell-desk) ~> umask 022
> [1002] (lowell-desk) ~> touch baz
> [1003] (lowell-desk) ~> ls -l baz
> -rw-r--r-- 1 lowell family 0 Nov 24 07:44 baz
> [1004] (lowell-desk) ~>

Then what umask do I use to achieve 775? Do I use 002?

Lowell Gilbert

unread,
Nov 24, 2009, 1:36:28 PM11/24/09
to
MZ <ma...@nospam.void> writes:

Yes.

0 new messages