Please, can someone explain this to me?
I set:

umask 000
touch afile.tmp


-rw-rw-rw- 1 jay apache 0 Aug 16 18:11 afile.tmp

I was expecting this:


to be like this:


Why isn't umask setting the 'x'`s of the permissions for new file modifications?

1 Answer 1


umask is working precisely as expected - a mask of 0000 means permissions are 666 (rw-rw-rw-) for files and 777 (rwxrwxrwx) for directories. The execute bit is set for directories and not files. Case in point: the default umask is 0022, but files you create don't have the execute bit set by default, do they?

  • 022 yields only -rw-r--r--.So, umask can't change the execute bits?
    – Ted
    Aug 16, 2014 at 17:29
  • @Ted not for files.
    – muru
    Aug 16, 2014 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.