On 14:57 24 Apr 2002, christopher j bottaro <[EMAIL PROTECTED]> wrote:
| why doesn't umask set a file's executable attribute?  for example, if i do: 
| umask 000
| touch test
| 
| test's permissions are rw-rw-rw-
| why is that?

Umask is applied to the permissions given to the open() system call.
Almost all apps hand the mode 0666 to this call, because they're
creating data files of one kind or another. Only compilers (well, the
find link phase) passes 0777 to open(), because it _knows_ it's making
an executable.

So this is noraml and correct. And desirable, because it means arbitrary
files aren't misused as executables until you say so with an explicit
chmod.

Cheers,
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

..to know him was to love him. And to love him was to know him. Those who
know him LOVED him - while those who did not know him, loved him from afar...
        - Data/Graves, "The Schizoid Man", stardate 42437.5



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to