Linux Debian support - umask question

This is Interesting: Free IT Magazines  
Home > Archive > Linux Debian support > March 2006 > umask question





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author umask question
Robert Secon

2006-02-06, 5:48 pm

Hi everybody,

got Debian Sarge system (kernel 2.6.8-2-686)

Problem with umask: when setting umask to 000 it gives me just rw-rw-rw-
instead of rwxrwxrwx

-rw-rw-rw- 1 robert robert 0 2006-02-06 23:02 000
-rw-rw-rw- 1 robert robert 0 2006-02-06 23:02 0000
-rw-rw-rw- 1 robert robert 0 2006-02-06 23:02 000
-rw-rw-rw- 1 robert robert 0 2006-02-06 23:02 0000
-rw-rw-rw- 1 root root 0 2006-02-06 23:38 111


Files were created with the touch command (relating to the umask number,
file 000 means umask 000 and so on).

I want to create a file creation mask rwxrwxr-x with umask, why does it not
work?

Thanks in advance
Rob


Bill Marcum

2006-02-07, 2:46 am

On Mon, 6 Feb 2006 23:33:17 +0100, Robert Secon
<r_secon@gmx.de> wrote:
> Hi everybody,
>
> got Debian Sarge system (kernel 2.6.8-2-686)
>
> Problem with umask: when setting umask to 000 it gives me just rw-rw-rw-
> instead of rwxrwxrwx
>
> -rw-rw-rw- 1 robert robert 0 2006-02-06 23:02 000
> -rw-rw-rw- 1 robert robert 0 2006-02-06 23:02 0000
> -rw-rw-rw- 1 robert robert 0 2006-02-06 23:02 000
> -rw-rw-rw- 1 robert robert 0 2006-02-06 23:02 0000
> -rw-rw-rw- 1 root root 0 2006-02-06 23:38 111
>
>
> Files were created with the touch command (relating to the umask number,
> file 000 means umask 000 and so on).
>
> I want to create a file creation mask rwxrwxr-x with umask, why does it not
> work?
>

Umask just doesn't work that way. If you want a file to be executable,
you have to "chmod +x".


--
A friend of mine won't get a divorce, because he hates lawyers more than he
hates his wife.
Robert Secon

2006-02-07, 2:46 am

"Bill Marcum" <bmarcum@iglou.com> wrote
> Umask just doesn't work that way. If you want a file to be executable,
> you have to "chmod +x".


I know how to change the permission, but that works not for file creation.
Don't want to chmod' all my files after creating them.

Anyway, thanks for your help, although it does solve the problem.

Rob


Bill Marcum

2006-02-07, 2:46 am

On Tue, 7 Feb 2006 05:11:04 +0100, Robert Secon
<r_secon@gmx.de> wrote:
> "Bill Marcum" <bmarcum@iglou.com> wrote
>
> I know how to change the permission, but that works not for file creation.
> Don't want to chmod' all my files after creating them.
>

Why do you want all your files to be executable?


--
Beauty, brains, availability, personality; pick any two.
Robert Secon

2006-02-07, 5:48 pm

> Why do you want all your files to be executable?

I have groups that must have the option to execute files. I don't want to
change them all after creating them.


Rodney

2006-02-08, 7:46 am

On Tue, 07 Feb 2006 18:42:26 +0100, Robert Secon wrote:

>
> I have groups that must have the option to execute files. I don't want to
> change them all after creating them.



I think perhaps the point of poster Bill M's question was that not all
files are executables, thus it seems somewhat pointless to change them all
to that.

It might be easier if you were to explain a bit more exactly what you are
trying to achieve for these groups you mention, there is probably a way to
do it when the knowledgable people see what you are trying to accomplish.

Rodney

johnA

2006-03-12, 8:45 pm

Robert Secon wrote:
> Hi everybody,
>
> got Debian Sarge system (kernel 2.6.8-2-686)
>
> Problem with umask: when setting umask to 000 it gives me just rw-rw-rw-
> instead of rwxrwxrwx


<snip>

That is correct, the default file creation mode is 666 and with a umask
of 000 you still get mode 666 or rw-rw-rw-. Note it is not possible to
create a file with executable permission as the umask can only take away
permissions. Directories have a default creation mode of 777 or
rwxrwxrwx permissions where the "x bit" does not allow execution but
entry into the directory.


JohnA
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com