If a directory isn't executable you won't be able to ls it.
A file doesn't have to be executable to read/write it.
If the directory is set to 666 by default you would never be able to ls t=
he=20
directories contents. Where as you usually don't want executable files=20
everywhere when you are only writing text... or test scripts.
nathan
Am 16 Montag, Dezember 2002 12:09 schrieb Jeffrey Pyne:
> One question that perplexed me when I first learned UNIX (actually
> Solaris), was why, if I have a umask of 022, do new files I create get
> created with 644 permissions, not 755. 777 XOR 022 =3D 755, does it no=
t? It
> turns out that the permissions of new files are determined by XORing yo=
ur
> umask with 666, while the permissions of new directories are determined=
by
> XORing your umask with 777. So:
>
> $ umask
> 022
> $ touch foo
> $ mkdir bar
> $ ls -l
> total 4096
> -rw-r--r-- 1 jpyne jpyne 0 Dec 16 12:14 foo
> drwxr-xr-x 2 jpyne jpyne 4096 Dec 16 12:14 bar
>
> I wonder, what was the historical reason for making the default permiss=
ions
> of a new file 666 and a new directory 777?
>
> ~Jeff
>
> On Sunday, December 15, 2002 8:41 PM, J.Francois wrote:
> > A fully available file is like you have above:
> >
> > 7 7 7 =3D=3D rwx rwx rwx
> > 111 111 111
> >
> > a umask of 022, for example, means "take away access
> > permisions" like so:
> >
> > 7 7 7 111 111 111
> > - 0 2 2 000 010 010 <--- Here is your umask
> > =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > 7 5 5 111 101 101
> > rwx r-x r-x
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
- --=20
Nathan England
plug at the-arcanum.org
jabber id:
linuxjunkie@jabber.earth.li
"A free society is one where it is safe to be unpopular."
- --Adlai Stevenson
- -----------------------------------------------------------------
Registered Linux User #189789, Machine #106603
www.sincerechoice.org
Spam related material will be forwarded to:
uce@ftc.gov