+x permission for files in directory

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





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm an Ubuntu user and I'd like to change default permissions for downloaded files. Currentely all downloaded files are automatically saved with "-rw-r--r--" permissions (umask 0022). I'd like to add "+x". How to do that?










share|improve this question



















  • 7





    This is a very bad idea. Why do you want to do this?

    – Chris Down
    Sep 24 '11 at 13:56











  • Related: facl ignoring the “x” permission but only on files.

    – Scott
    Jul 7 '15 at 14:06


















0















I'm an Ubuntu user and I'd like to change default permissions for downloaded files. Currentely all downloaded files are automatically saved with "-rw-r--r--" permissions (umask 0022). I'd like to add "+x". How to do that?










share|improve this question



















  • 7





    This is a very bad idea. Why do you want to do this?

    – Chris Down
    Sep 24 '11 at 13:56











  • Related: facl ignoring the “x” permission but only on files.

    – Scott
    Jul 7 '15 at 14:06














0












0








0








I'm an Ubuntu user and I'd like to change default permissions for downloaded files. Currentely all downloaded files are automatically saved with "-rw-r--r--" permissions (umask 0022). I'd like to add "+x". How to do that?










share|improve this question
















I'm an Ubuntu user and I'd like to change default permissions for downloaded files. Currentely all downloaded files are automatically saved with "-rw-r--r--" permissions (umask 0022). I'd like to add "+x". How to do that?







permissions files






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 10 at 4:15









Rui F Ribeiro

42k1483142




42k1483142










asked Sep 24 '11 at 13:39









Sebastian ŁaskawiecSebastian Łaskawiec

1031




1031







  • 7





    This is a very bad idea. Why do you want to do this?

    – Chris Down
    Sep 24 '11 at 13:56











  • Related: facl ignoring the “x” permission but only on files.

    – Scott
    Jul 7 '15 at 14:06













  • 7





    This is a very bad idea. Why do you want to do this?

    – Chris Down
    Sep 24 '11 at 13:56











  • Related: facl ignoring the “x” permission but only on files.

    – Scott
    Jul 7 '15 at 14:06








7




7





This is a very bad idea. Why do you want to do this?

– Chris Down
Sep 24 '11 at 13:56





This is a very bad idea. Why do you want to do this?

– Chris Down
Sep 24 '11 at 13:56













Related: facl ignoring the “x” permission but only on files.

– Scott
Jul 7 '15 at 14:06






Related: facl ignoring the “x” permission but only on files.

– Scott
Jul 7 '15 at 14:06











2 Answers
2






active

oldest

votes


















3














You would have to edit the source code of the programs performing the downloading as files are created by default as 0666 modified by the current umask. From the fopen(3) man page:




 Any created files will have mode S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
| S_IROTH | S_IWOTH (0666), as modified by the process’s umask value
(see umask(2)).






share|improve this answer






























    0














    which program do you use to download? If the program doesn't have hard permission for new files compiled in, you can simply set the environments umask before starting the program (in the same env / shell).



    With bash there is a "umask" command, try 'help umask' in bash.



    e.g. umask 0000; wget htpp://






    share|improve this answer























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "106"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f21353%2fx-permission-for-files-in-directory%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      You would have to edit the source code of the programs performing the downloading as files are created by default as 0666 modified by the current umask. From the fopen(3) man page:




       Any created files will have mode S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
      | S_IROTH | S_IWOTH (0666), as modified by the process’s umask value
      (see umask(2)).






      share|improve this answer



























        3














        You would have to edit the source code of the programs performing the downloading as files are created by default as 0666 modified by the current umask. From the fopen(3) man page:




         Any created files will have mode S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
        | S_IROTH | S_IWOTH (0666), as modified by the process’s umask value
        (see umask(2)).






        share|improve this answer

























          3












          3








          3







          You would have to edit the source code of the programs performing the downloading as files are created by default as 0666 modified by the current umask. From the fopen(3) man page:




           Any created files will have mode S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
          | S_IROTH | S_IWOTH (0666), as modified by the process’s umask value
          (see umask(2)).






          share|improve this answer













          You would have to edit the source code of the programs performing the downloading as files are created by default as 0666 modified by the current umask. From the fopen(3) man page:




           Any created files will have mode S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
          | S_IROTH | S_IWOTH (0666), as modified by the process’s umask value
          (see umask(2)).







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 24 '11 at 13:53









          Ignacio Vazquez-AbramsIgnacio Vazquez-Abrams

          33.8k66983




          33.8k66983























              0














              which program do you use to download? If the program doesn't have hard permission for new files compiled in, you can simply set the environments umask before starting the program (in the same env / shell).



              With bash there is a "umask" command, try 'help umask' in bash.



              e.g. umask 0000; wget htpp://






              share|improve this answer



























                0














                which program do you use to download? If the program doesn't have hard permission for new files compiled in, you can simply set the environments umask before starting the program (in the same env / shell).



                With bash there is a "umask" command, try 'help umask' in bash.



                e.g. umask 0000; wget htpp://






                share|improve this answer

























                  0












                  0








                  0







                  which program do you use to download? If the program doesn't have hard permission for new files compiled in, you can simply set the environments umask before starting the program (in the same env / shell).



                  With bash there is a "umask" command, try 'help umask' in bash.



                  e.g. umask 0000; wget htpp://






                  share|improve this answer













                  which program do you use to download? If the program doesn't have hard permission for new files compiled in, you can simply set the environments umask before starting the program (in the same env / shell).



                  With bash there is a "umask" command, try 'help umask' in bash.



                  e.g. umask 0000; wget htpp://







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 12 '15 at 14:12









                  Andreas JohnAndreas John

                  612




                  612



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f21353%2fx-permission-for-files-in-directory%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown






                      Popular posts from this blog

                      Peggy Mitchell

                      Palaiologos

                      The Forum (Inglewood, California)