umask not being applied? [duplicate]
Clash Royale CLAN TAG#URR8PPP
This question already has an answer here:
How to set file permissions with touch command
2 answers
I am setting the umask
to a new value as below.
However although I am applying rxw
to the user, this does not seem to be respected (?)
/home/pkaramol
$ umask u=rxw,g=rw,o=r
/home/pkaramol
$ umask -S
u=rwx,g=rw,o=r
/home/pkaramol
$ rm -rf afile && touch afile;
/home/pkaramol
$ ls -l afile
-rw-rw-r-- 1 pkaramol pkaramol 0 Μar 2 10:30 afile
edit:
$ mount | grep -E 's/s'
/dev/sda3 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
$ mount | grep -i home
/home/pkaramol
permissions umask
marked as duplicate by Jeff Schaller♦, Thomas, Haxiel, jimmij, Mr Shunz Mar 4 at 10:59
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to set file permissions with touch command
2 answers
I am setting the umask
to a new value as below.
However although I am applying rxw
to the user, this does not seem to be respected (?)
/home/pkaramol
$ umask u=rxw,g=rw,o=r
/home/pkaramol
$ umask -S
u=rwx,g=rw,o=r
/home/pkaramol
$ rm -rf afile && touch afile;
/home/pkaramol
$ ls -l afile
-rw-rw-r-- 1 pkaramol pkaramol 0 Μar 2 10:30 afile
edit:
$ mount | grep -E 's/s'
/dev/sda3 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
$ mount | grep -i home
/home/pkaramol
permissions umask
marked as duplicate by Jeff Schaller♦, Thomas, Haxiel, jimmij, Mr Shunz Mar 4 at 10:59
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
@steve check my update;
– pkaramol
Mar 2 at 8:42
add a comment |
This question already has an answer here:
How to set file permissions with touch command
2 answers
I am setting the umask
to a new value as below.
However although I am applying rxw
to the user, this does not seem to be respected (?)
/home/pkaramol
$ umask u=rxw,g=rw,o=r
/home/pkaramol
$ umask -S
u=rwx,g=rw,o=r
/home/pkaramol
$ rm -rf afile && touch afile;
/home/pkaramol
$ ls -l afile
-rw-rw-r-- 1 pkaramol pkaramol 0 Μar 2 10:30 afile
edit:
$ mount | grep -E 's/s'
/dev/sda3 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
$ mount | grep -i home
/home/pkaramol
permissions umask
This question already has an answer here:
How to set file permissions with touch command
2 answers
I am setting the umask
to a new value as below.
However although I am applying rxw
to the user, this does not seem to be respected (?)
/home/pkaramol
$ umask u=rxw,g=rw,o=r
/home/pkaramol
$ umask -S
u=rwx,g=rw,o=r
/home/pkaramol
$ rm -rf afile && touch afile;
/home/pkaramol
$ ls -l afile
-rw-rw-r-- 1 pkaramol pkaramol 0 Μar 2 10:30 afile
edit:
$ mount | grep -E 's/s'
/dev/sda3 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
$ mount | grep -i home
/home/pkaramol
This question already has an answer here:
How to set file permissions with touch command
2 answers
permissions umask
permissions umask
edited Mar 2 at 8:56
pkaramol
asked Mar 2 at 8:32
pkaramolpkaramol
718621
718621
marked as duplicate by Jeff Schaller♦, Thomas, Haxiel, jimmij, Mr Shunz Mar 4 at 10:59
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Jeff Schaller♦, Thomas, Haxiel, jimmij, Mr Shunz Mar 4 at 10:59
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
@steve check my update;
– pkaramol
Mar 2 at 8:42
add a comment |
1
@steve check my update;
– pkaramol
Mar 2 at 8:42
1
1
@steve check my update;
– pkaramol
Mar 2 at 8:42
@steve check my update;
– pkaramol
Mar 2 at 8:42
add a comment |
1 Answer
1
active
oldest
votes
touch
creates files with permission 666 (-rw-rw-rw-) by default (with umask 000
). umask
can only subtract permissions ("take permissions away"). In your case only o=w
is affected. It cannot add any flags (u=x
) to newly created files. You have to use chmod
for that.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
touch
creates files with permission 666 (-rw-rw-rw-) by default (with umask 000
). umask
can only subtract permissions ("take permissions away"). In your case only o=w
is affected. It cannot add any flags (u=x
) to newly created files. You have to use chmod
for that.
add a comment |
touch
creates files with permission 666 (-rw-rw-rw-) by default (with umask 000
). umask
can only subtract permissions ("take permissions away"). In your case only o=w
is affected. It cannot add any flags (u=x
) to newly created files. You have to use chmod
for that.
add a comment |
touch
creates files with permission 666 (-rw-rw-rw-) by default (with umask 000
). umask
can only subtract permissions ("take permissions away"). In your case only o=w
is affected. It cannot add any flags (u=x
) to newly created files. You have to use chmod
for that.
touch
creates files with permission 666 (-rw-rw-rw-) by default (with umask 000
). umask
can only subtract permissions ("take permissions away"). In your case only o=w
is affected. It cannot add any flags (u=x
) to newly created files. You have to use chmod
for that.
answered Mar 2 at 9:04
FreddyFreddy
1,429210
1,429210
add a comment |
add a comment |
1
@steve check my update;
– pkaramol
Mar 2 at 8:42