umask not being applied? [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












3
















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









share|improve this 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















3
















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









share|improve this 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













3












3








3









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









share|improve this question

















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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












  • 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










1 Answer
1






active

oldest

votes


















6














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.






share|improve this answer





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    6














    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.






    share|improve this answer



























      6














      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.






      share|improve this answer

























        6












        6








        6







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 2 at 9:04









        FreddyFreddy

        1,429210




        1,429210












            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?