Welcome to the Linux Foundation Forum!

Understanding umask -S (demo 32.10)

I have no problem understanding umask and its meaning. Thus I can interpret the output of umask.

In the demo we see the output of "umask -S" which show the symbolic representation of default permissions (and not the actual mask).

  1. $ umask -S -p
  2. umask -S u=rwx,g=rwx,o=rx

The part that bug me is the "x", which would be true for directories. However, by default files don't get it. Would this mean as far masking go "x" is assumed to only apply to directories?

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 916

    Yes. "x" is for directories. "x" for directories means users can cd to it and access files and subdirectories.

  • Posts: 41

    Thank you.

  • Posts: 916

    Yes, to convince myself I did some experiments with changing umask to things like 666 and making directories and files etc. Behaviour is consistent with documentation.

  • Posts: 41

    Thank you for confirming. I had not doubts about the numbers. just the -S representation read odd for me (with the x).

    That made me realise also, it is impossible to set umask to make files executable by default (not that one would want to).

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training