folder permissions

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








up vote
0
down vote

favorite












I have a user user1 that belongs to group1 as primary group, but I need this user to have read/write access to a folder that belongs to group2.



I tried adding a secondary group to this user so it now belongs to group1 as primary group and group2 as secondary group but I still don't have access to the folder.



I used this command to add the primary group usermod -g group1 user1 and this one to add the secondary group usermod -a -G group2 user1



This are my folders permissions:




drwxr-xr-x 8 owner group1 4096 jun 5 10:26 ./
drwxr-xr-x 6 owner owner 4096 jun 5 10:03 ../
drwxrwx--- 14 owner group1 4096 jun 5 11:12 folder1
drwxrwx--- 5 owner group1 4096 may 24 11:32 folder2
drwxrwx--- 13 owner group2 4096 jun 5 10:29 folder3
drwxrwx--- 3 owner group2 4096 jun 5 10:26 folder4
drwxrwx--- 8 owner group2 4096 jun 5 10:25 folder5
drwxrwx--- 6 owner group1 4096 jun 2 09:19 folder6


Can you help me solve this problem please?







share|improve this question

























    up vote
    0
    down vote

    favorite












    I have a user user1 that belongs to group1 as primary group, but I need this user to have read/write access to a folder that belongs to group2.



    I tried adding a secondary group to this user so it now belongs to group1 as primary group and group2 as secondary group but I still don't have access to the folder.



    I used this command to add the primary group usermod -g group1 user1 and this one to add the secondary group usermod -a -G group2 user1



    This are my folders permissions:




    drwxr-xr-x 8 owner group1 4096 jun 5 10:26 ./
    drwxr-xr-x 6 owner owner 4096 jun 5 10:03 ../
    drwxrwx--- 14 owner group1 4096 jun 5 11:12 folder1
    drwxrwx--- 5 owner group1 4096 may 24 11:32 folder2
    drwxrwx--- 13 owner group2 4096 jun 5 10:29 folder3
    drwxrwx--- 3 owner group2 4096 jun 5 10:26 folder4
    drwxrwx--- 8 owner group2 4096 jun 5 10:25 folder5
    drwxrwx--- 6 owner group1 4096 jun 2 09:19 folder6


    Can you help me solve this problem please?







    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a user user1 that belongs to group1 as primary group, but I need this user to have read/write access to a folder that belongs to group2.



      I tried adding a secondary group to this user so it now belongs to group1 as primary group and group2 as secondary group but I still don't have access to the folder.



      I used this command to add the primary group usermod -g group1 user1 and this one to add the secondary group usermod -a -G group2 user1



      This are my folders permissions:




      drwxr-xr-x 8 owner group1 4096 jun 5 10:26 ./
      drwxr-xr-x 6 owner owner 4096 jun 5 10:03 ../
      drwxrwx--- 14 owner group1 4096 jun 5 11:12 folder1
      drwxrwx--- 5 owner group1 4096 may 24 11:32 folder2
      drwxrwx--- 13 owner group2 4096 jun 5 10:29 folder3
      drwxrwx--- 3 owner group2 4096 jun 5 10:26 folder4
      drwxrwx--- 8 owner group2 4096 jun 5 10:25 folder5
      drwxrwx--- 6 owner group1 4096 jun 2 09:19 folder6


      Can you help me solve this problem please?







      share|improve this question













      I have a user user1 that belongs to group1 as primary group, but I need this user to have read/write access to a folder that belongs to group2.



      I tried adding a secondary group to this user so it now belongs to group1 as primary group and group2 as secondary group but I still don't have access to the folder.



      I used this command to add the primary group usermod -g group1 user1 and this one to add the secondary group usermod -a -G group2 user1



      This are my folders permissions:




      drwxr-xr-x 8 owner group1 4096 jun 5 10:26 ./
      drwxr-xr-x 6 owner owner 4096 jun 5 10:03 ../
      drwxrwx--- 14 owner group1 4096 jun 5 11:12 folder1
      drwxrwx--- 5 owner group1 4096 may 24 11:32 folder2
      drwxrwx--- 13 owner group2 4096 jun 5 10:29 folder3
      drwxrwx--- 3 owner group2 4096 jun 5 10:26 folder4
      drwxrwx--- 8 owner group2 4096 jun 5 10:25 folder5
      drwxrwx--- 6 owner group1 4096 jun 2 09:19 folder6


      Can you help me solve this problem please?









      share|improve this question












      share|improve this question




      share|improve this question








      edited Jun 5 at 18:13









      wjandrea

      7,01542054




      7,01542054









      asked Jun 5 at 17:42









      Mateo Guty

      11




      11




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote













          If I understand correctly (but it's confusing) I think you've to approach this the other way around. If I understand you correctly you tried to add a group to an user.
          What would work is adding the user to a group.
          If you want user1 to have access to folders/ files of group 2, do:



          sudo adduser user1 group2






          share|improve this answer





















          • Wow, I really didn't make my self clear, i'm sorry what i'm trying to do is give permissions to one single user with two different groups.
            – Mateo Guty
            Jun 5 at 22:52

















          up vote
          0
          down vote



          accepted










          Thanks to KamilMaciorowski for the answer I need to modify the smb.conf file and add the new group in order to be able to have access.



          I modify it this way:



          [PEI]
          browsable = yes
          path = smb/dir
          guest ok = no
          guest only = no
          create mask = 0770
          directory mask = 0770
          write list = @group1, @group2
          read list =
          valid users = @group1, @group2
          read only = no





          share|improve this answer





















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            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: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1043890%2ffolder-permissions%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            If I understand correctly (but it's confusing) I think you've to approach this the other way around. If I understand you correctly you tried to add a group to an user.
            What would work is adding the user to a group.
            If you want user1 to have access to folders/ files of group 2, do:



            sudo adduser user1 group2






            share|improve this answer





















            • Wow, I really didn't make my self clear, i'm sorry what i'm trying to do is give permissions to one single user with two different groups.
              – Mateo Guty
              Jun 5 at 22:52














            up vote
            0
            down vote













            If I understand correctly (but it's confusing) I think you've to approach this the other way around. If I understand you correctly you tried to add a group to an user.
            What would work is adding the user to a group.
            If you want user1 to have access to folders/ files of group 2, do:



            sudo adduser user1 group2






            share|improve this answer





















            • Wow, I really didn't make my self clear, i'm sorry what i'm trying to do is give permissions to one single user with two different groups.
              – Mateo Guty
              Jun 5 at 22:52












            up vote
            0
            down vote










            up vote
            0
            down vote









            If I understand correctly (but it's confusing) I think you've to approach this the other way around. If I understand you correctly you tried to add a group to an user.
            What would work is adding the user to a group.
            If you want user1 to have access to folders/ files of group 2, do:



            sudo adduser user1 group2






            share|improve this answer













            If I understand correctly (but it's confusing) I think you've to approach this the other way around. If I understand you correctly you tried to add a group to an user.
            What would work is adding the user to a group.
            If you want user1 to have access to folders/ files of group 2, do:



            sudo adduser user1 group2







            share|improve this answer













            share|improve this answer



            share|improve this answer











            answered Jun 5 at 18:09









            Goth Queen

            312




            312











            • Wow, I really didn't make my self clear, i'm sorry what i'm trying to do is give permissions to one single user with two different groups.
              – Mateo Guty
              Jun 5 at 22:52
















            • Wow, I really didn't make my self clear, i'm sorry what i'm trying to do is give permissions to one single user with two different groups.
              – Mateo Guty
              Jun 5 at 22:52















            Wow, I really didn't make my self clear, i'm sorry what i'm trying to do is give permissions to one single user with two different groups.
            – Mateo Guty
            Jun 5 at 22:52




            Wow, I really didn't make my self clear, i'm sorry what i'm trying to do is give permissions to one single user with two different groups.
            – Mateo Guty
            Jun 5 at 22:52












            up vote
            0
            down vote



            accepted










            Thanks to KamilMaciorowski for the answer I need to modify the smb.conf file and add the new group in order to be able to have access.



            I modify it this way:



            [PEI]
            browsable = yes
            path = smb/dir
            guest ok = no
            guest only = no
            create mask = 0770
            directory mask = 0770
            write list = @group1, @group2
            read list =
            valid users = @group1, @group2
            read only = no





            share|improve this answer

























              up vote
              0
              down vote



              accepted










              Thanks to KamilMaciorowski for the answer I need to modify the smb.conf file and add the new group in order to be able to have access.



              I modify it this way:



              [PEI]
              browsable = yes
              path = smb/dir
              guest ok = no
              guest only = no
              create mask = 0770
              directory mask = 0770
              write list = @group1, @group2
              read list =
              valid users = @group1, @group2
              read only = no





              share|improve this answer























                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                Thanks to KamilMaciorowski for the answer I need to modify the smb.conf file and add the new group in order to be able to have access.



                I modify it this way:



                [PEI]
                browsable = yes
                path = smb/dir
                guest ok = no
                guest only = no
                create mask = 0770
                directory mask = 0770
                write list = @group1, @group2
                read list =
                valid users = @group1, @group2
                read only = no





                share|improve this answer













                Thanks to KamilMaciorowski for the answer I need to modify the smb.conf file and add the new group in order to be able to have access.



                I modify it this way:



                [PEI]
                browsable = yes
                path = smb/dir
                guest ok = no
                guest only = no
                create mask = 0770
                directory mask = 0770
                write list = @group1, @group2
                read list =
                valid users = @group1, @group2
                read only = no






                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered Jun 6 at 13:26









                Mateo Guty

                11




                11






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1043890%2ffolder-permissions%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                    Trouble downloading packages list due to a “Hash sum mismatch” error

                    How do I move numbers in filenames, in a batch renaming operation?