Re: Umask strange behaviour 555=444 ?



All right.
I was thinking about turn __ON__ instead of turnoff. Much better now.

Just correcting one thing you said:
"Since the X bits are normally turned on"
I guess you meant "turned off" here (not vfat)

Thank you.

On May 16, 3:42 pm, "Robert M. Riches Jr." <spamtra...@xxxxxxxxxxx>
wrote:
On 2007-05-16, leoh <leonardomach...@xxxxxxxxx> wrote:

Why is umaks 654 and 644 returning the same file permission?

# umask 555
# touch t1
total 0
--w--w--w- 1 root root 0 2007-05-16 05:28 t1

I think that t1 should be --- --- --- (000) since --x --x --x (111)
would not be allowed for common files (just directories).

Moreover, why would umaks 555 produce the same result as umask 444 ??

Doing 'umask 555' says to turn _OFF_ the R and X bits. Doing
'umask 444' says to turn _OFF_ the R bits. Since the X bits
are normally turned on, both should produce the "-w-"
pattern you showed above.

The key is that the value given to the umask command is
negated relative to the permission bits on the files.

Or, is this on a FAT-based filesystem?

--
Robert Riches
spamtra...@xxxxxxxxxxx
(Yes, that is one of my email addresses.)


.



Relevant Pages

  • Re: Umask strange behaviour 555=444 ?
    ... would not be allowed for common files. ... Doing 'umask 555' says to turn _OFF_ the R and X bits. ... I guess you meant "turned off" here (not vfat) ... Please do not top-post. ...
    (comp.os.linux.misc)
  • Re: Umask strange behaviour 555=444 ?
    ... would not be allowed for common files. ... why would umaks 555 produce the same result as umask 444 ?? ... Robert Riches ...
    (comp.os.linux.misc)