Linux permission for group users to delete files and directory











up vote
0
down vote

favorite












I need to grant users in a group to delete the directory and files inside the directory. I have added all the users to group named "fileHandlers". I want all users in this group to have permission to create files or folders and delete them.



drwxr-sr-x 2 www-data fileHandlers 4096 Nov 26 13:13 7005C0FA85E4A0B445E77C126EEB8056 


In the above example only www-data is able to delete this files. how can i extend it for all the users in group "fileHandlers"










share|improve this question






















  • Use ACL or just grant them write permission: chmod -R g+w whatever
    – iBug
    Nov 27 at 4:04















up vote
0
down vote

favorite












I need to grant users in a group to delete the directory and files inside the directory. I have added all the users to group named "fileHandlers". I want all users in this group to have permission to create files or folders and delete them.



drwxr-sr-x 2 www-data fileHandlers 4096 Nov 26 13:13 7005C0FA85E4A0B445E77C126EEB8056 


In the above example only www-data is able to delete this files. how can i extend it for all the users in group "fileHandlers"










share|improve this question






















  • Use ACL or just grant them write permission: chmod -R g+w whatever
    – iBug
    Nov 27 at 4:04













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I need to grant users in a group to delete the directory and files inside the directory. I have added all the users to group named "fileHandlers". I want all users in this group to have permission to create files or folders and delete them.



drwxr-sr-x 2 www-data fileHandlers 4096 Nov 26 13:13 7005C0FA85E4A0B445E77C126EEB8056 


In the above example only www-data is able to delete this files. how can i extend it for all the users in group "fileHandlers"










share|improve this question













I need to grant users in a group to delete the directory and files inside the directory. I have added all the users to group named "fileHandlers". I want all users in this group to have permission to create files or folders and delete them.



drwxr-sr-x 2 www-data fileHandlers 4096 Nov 26 13:13 7005C0FA85E4A0B445E77C126EEB8056 


In the above example only www-data is able to delete this files. how can i extend it for all the users in group "fileHandlers"







linux






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 27 at 3:55









codlib

101




101












  • Use ACL or just grant them write permission: chmod -R g+w whatever
    – iBug
    Nov 27 at 4:04


















  • Use ACL or just grant them write permission: chmod -R g+w whatever
    – iBug
    Nov 27 at 4:04
















Use ACL or just grant them write permission: chmod -R g+w whatever
– iBug
Nov 27 at 4:04




Use ACL or just grant them write permission: chmod -R g+w whatever
– iBug
Nov 27 at 4:04










2 Answers
2






active

oldest

votes

















up vote
2
down vote













You need to give the users (i.e., the group)
write permission to the directory:


chmod g+w dirname

For them to be able to delete the directory itself,
they need write permission to the parent directory.




share|improve this answer




























    up vote
    0
    down vote













    fixed the problem with following commands



     chgrp -R fileHandlers attachments/
    chmod -R g+w attachments/
    find attachments -type d -exec chmod 2775 {} ;
    find attachments -type f -exec chmod ug+rw {} ;





    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',
      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%2f484353%2flinux-permission-for-group-users-to-delete-files-and-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








      up vote
      2
      down vote













      You need to give the users (i.e., the group)
      write permission to the directory:


      chmod g+w dirname

      For them to be able to delete the directory itself,
      they need write permission to the parent directory.




      share|improve this answer

























        up vote
        2
        down vote













        You need to give the users (i.e., the group)
        write permission to the directory:


        chmod g+w dirname

        For them to be able to delete the directory itself,
        they need write permission to the parent directory.




        share|improve this answer























          up vote
          2
          down vote










          up vote
          2
          down vote









          You need to give the users (i.e., the group)
          write permission to the directory:


          chmod g+w dirname

          For them to be able to delete the directory itself,
          they need write permission to the parent directory.




          share|improve this answer












          You need to give the users (i.e., the group)
          write permission to the directory:


          chmod g+w dirname

          For them to be able to delete the directory itself,
          they need write permission to the parent directory.





          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 27 at 4:06









          Scott

          6,77742650




          6,77742650
























              up vote
              0
              down vote













              fixed the problem with following commands



               chgrp -R fileHandlers attachments/
              chmod -R g+w attachments/
              find attachments -type d -exec chmod 2775 {} ;
              find attachments -type f -exec chmod ug+rw {} ;





              share|improve this answer

























                up vote
                0
                down vote













                fixed the problem with following commands



                 chgrp -R fileHandlers attachments/
                chmod -R g+w attachments/
                find attachments -type d -exec chmod 2775 {} ;
                find attachments -type f -exec chmod ug+rw {} ;





                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  fixed the problem with following commands



                   chgrp -R fileHandlers attachments/
                  chmod -R g+w attachments/
                  find attachments -type d -exec chmod 2775 {} ;
                  find attachments -type f -exec chmod ug+rw {} ;





                  share|improve this answer












                  fixed the problem with following commands



                   chgrp -R fileHandlers attachments/
                  chmod -R g+w attachments/
                  find attachments -type d -exec chmod 2775 {} ;
                  find attachments -type f -exec chmod ug+rw {} ;






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 27 at 6:33









                  codlib

                  101




                  101






























                      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.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • 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%2f484353%2flinux-permission-for-group-users-to-delete-files-and-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

                      List directoties down one level, excluding some named directories and files

                      list processes belonging to a network namespace

                      list systemd RuntimeDirectory mounts