Linux (ubuntu) Permission confusion

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








up vote
1
down vote

favorite












Please, take a look at the following CMD



[thunder@ip-xxx-xx-xx-xx /]$ id
uid=504(thunder) gid=504(thunder) groups=504(thunder)

[thunder@ip-xxx-xx-xx-xx /]$ grep developers /etc/group
developers:x:505:501,502,503,504

[thunder@ip-xxx-xx-xx-xx /]$ groups
thunder


My question is why doesn't developers show up in my groups command



Below you can see



[thunder@ip-xxx-xx-xx-xx opt]$ ls -l
total 12
drwxr-xr-x 5 root root 4096 Mar 7 06:46 aws
-rwxr-xr-x 1 root root 63 Mar 23 22:37 permissions.sh
drwxrwxr-x 7 root developers 4096 Mar 26 19:30 web


The "web" folder has developers as its group,
but still I cannot perform this inside the "web" folder



[thunder@ip-xxx-xx-xx-xx opt]$ cd web
[thunder@ip-xxx-xx-xx-xx web]$ touch a
touch: cannot touch ‘a’: Permission denied


Note: I tried logging out and logging back in using the logout and exit command, but still no success.










share|improve this question

























    up vote
    1
    down vote

    favorite












    Please, take a look at the following CMD



    [thunder@ip-xxx-xx-xx-xx /]$ id
    uid=504(thunder) gid=504(thunder) groups=504(thunder)

    [thunder@ip-xxx-xx-xx-xx /]$ grep developers /etc/group
    developers:x:505:501,502,503,504

    [thunder@ip-xxx-xx-xx-xx /]$ groups
    thunder


    My question is why doesn't developers show up in my groups command



    Below you can see



    [thunder@ip-xxx-xx-xx-xx opt]$ ls -l
    total 12
    drwxr-xr-x 5 root root 4096 Mar 7 06:46 aws
    -rwxr-xr-x 1 root root 63 Mar 23 22:37 permissions.sh
    drwxrwxr-x 7 root developers 4096 Mar 26 19:30 web


    The "web" folder has developers as its group,
    but still I cannot perform this inside the "web" folder



    [thunder@ip-xxx-xx-xx-xx opt]$ cd web
    [thunder@ip-xxx-xx-xx-xx web]$ touch a
    touch: cannot touch ‘a’: Permission denied


    Note: I tried logging out and logging back in using the logout and exit command, but still no success.










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Please, take a look at the following CMD



      [thunder@ip-xxx-xx-xx-xx /]$ id
      uid=504(thunder) gid=504(thunder) groups=504(thunder)

      [thunder@ip-xxx-xx-xx-xx /]$ grep developers /etc/group
      developers:x:505:501,502,503,504

      [thunder@ip-xxx-xx-xx-xx /]$ groups
      thunder


      My question is why doesn't developers show up in my groups command



      Below you can see



      [thunder@ip-xxx-xx-xx-xx opt]$ ls -l
      total 12
      drwxr-xr-x 5 root root 4096 Mar 7 06:46 aws
      -rwxr-xr-x 1 root root 63 Mar 23 22:37 permissions.sh
      drwxrwxr-x 7 root developers 4096 Mar 26 19:30 web


      The "web" folder has developers as its group,
      but still I cannot perform this inside the "web" folder



      [thunder@ip-xxx-xx-xx-xx opt]$ cd web
      [thunder@ip-xxx-xx-xx-xx web]$ touch a
      touch: cannot touch ‘a’: Permission denied


      Note: I tried logging out and logging back in using the logout and exit command, but still no success.










      share|improve this question













      Please, take a look at the following CMD



      [thunder@ip-xxx-xx-xx-xx /]$ id
      uid=504(thunder) gid=504(thunder) groups=504(thunder)

      [thunder@ip-xxx-xx-xx-xx /]$ grep developers /etc/group
      developers:x:505:501,502,503,504

      [thunder@ip-xxx-xx-xx-xx /]$ groups
      thunder


      My question is why doesn't developers show up in my groups command



      Below you can see



      [thunder@ip-xxx-xx-xx-xx opt]$ ls -l
      total 12
      drwxr-xr-x 5 root root 4096 Mar 7 06:46 aws
      -rwxr-xr-x 1 root root 63 Mar 23 22:37 permissions.sh
      drwxrwxr-x 7 root developers 4096 Mar 26 19:30 web


      The "web" folder has developers as its group,
      but still I cannot perform this inside the "web" folder



      [thunder@ip-xxx-xx-xx-xx opt]$ cd web
      [thunder@ip-xxx-xx-xx-xx web]$ touch a
      touch: cannot touch ‘a’: Permission denied


      Note: I tried logging out and logging back in using the logout and exit command, but still no success.







      permissions users groups






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 21:25









      ThunderRoid

      1063




      1063




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          man 5 group states that the forth section of each line is (emphasis added):




          a list of the usernames that are members of this group, separated by commas.




          Having numeric user IDs in this list doesn't seem to work.




          I think you have to use something like



          sudo gpasswd -a $USER developers


          or



          sudo usermod $USER -aG developers


          to actually add yourself to the developers group.



          After that, logout and re-login, then use



          id -Gn


          to get a list of your groups.






          share|improve this answer






















          • but to run sudo gpasswd i will need root access which i don't have
            – ThunderRoid
            Mar 28 at 21:53










          • @ThunderRoid You have to ask the administrator then... because you are not really in developers group.
            – Ravexina
            Mar 28 at 21:56











          • but grep developers /etc/group shows that i am, because it has my uid, as u can see in op
            – ThunderRoid
            Mar 28 at 21:57






          • 1




            There should be a list of the "usernames" not "user id", I tested it on my local machine... uid does not works. I also quoted a line from /etc/group manual page: " a list of the usernames that are members of this group, separated by commas."
            – Ravexina
            Mar 28 at 21:59






          • 1




            I edited your answer to emphasize that one has to put the user names into /etc/groups, not the UIDs. At least for me, that wasn't too clear until I saw your comment above. Btw, another (more common?) command to add a USER to a GROUP is sudo adduser USER GROUP.
            – Byte Commander
            Mar 28 at 22:57










          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%2f1020103%2flinux-ubuntu-permission-confusion%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          man 5 group states that the forth section of each line is (emphasis added):




          a list of the usernames that are members of this group, separated by commas.




          Having numeric user IDs in this list doesn't seem to work.




          I think you have to use something like



          sudo gpasswd -a $USER developers


          or



          sudo usermod $USER -aG developers


          to actually add yourself to the developers group.



          After that, logout and re-login, then use



          id -Gn


          to get a list of your groups.






          share|improve this answer






















          • but to run sudo gpasswd i will need root access which i don't have
            – ThunderRoid
            Mar 28 at 21:53










          • @ThunderRoid You have to ask the administrator then... because you are not really in developers group.
            – Ravexina
            Mar 28 at 21:56











          • but grep developers /etc/group shows that i am, because it has my uid, as u can see in op
            – ThunderRoid
            Mar 28 at 21:57






          • 1




            There should be a list of the "usernames" not "user id", I tested it on my local machine... uid does not works. I also quoted a line from /etc/group manual page: " a list of the usernames that are members of this group, separated by commas."
            – Ravexina
            Mar 28 at 21:59






          • 1




            I edited your answer to emphasize that one has to put the user names into /etc/groups, not the UIDs. At least for me, that wasn't too clear until I saw your comment above. Btw, another (more common?) command to add a USER to a GROUP is sudo adduser USER GROUP.
            – Byte Commander
            Mar 28 at 22:57














          up vote
          1
          down vote













          man 5 group states that the forth section of each line is (emphasis added):




          a list of the usernames that are members of this group, separated by commas.




          Having numeric user IDs in this list doesn't seem to work.




          I think you have to use something like



          sudo gpasswd -a $USER developers


          or



          sudo usermod $USER -aG developers


          to actually add yourself to the developers group.



          After that, logout and re-login, then use



          id -Gn


          to get a list of your groups.






          share|improve this answer






















          • but to run sudo gpasswd i will need root access which i don't have
            – ThunderRoid
            Mar 28 at 21:53










          • @ThunderRoid You have to ask the administrator then... because you are not really in developers group.
            – Ravexina
            Mar 28 at 21:56











          • but grep developers /etc/group shows that i am, because it has my uid, as u can see in op
            – ThunderRoid
            Mar 28 at 21:57






          • 1




            There should be a list of the "usernames" not "user id", I tested it on my local machine... uid does not works. I also quoted a line from /etc/group manual page: " a list of the usernames that are members of this group, separated by commas."
            – Ravexina
            Mar 28 at 21:59






          • 1




            I edited your answer to emphasize that one has to put the user names into /etc/groups, not the UIDs. At least for me, that wasn't too clear until I saw your comment above. Btw, another (more common?) command to add a USER to a GROUP is sudo adduser USER GROUP.
            – Byte Commander
            Mar 28 at 22:57












          up vote
          1
          down vote










          up vote
          1
          down vote









          man 5 group states that the forth section of each line is (emphasis added):




          a list of the usernames that are members of this group, separated by commas.




          Having numeric user IDs in this list doesn't seem to work.




          I think you have to use something like



          sudo gpasswd -a $USER developers


          or



          sudo usermod $USER -aG developers


          to actually add yourself to the developers group.



          After that, logout and re-login, then use



          id -Gn


          to get a list of your groups.






          share|improve this answer














          man 5 group states that the forth section of each line is (emphasis added):




          a list of the usernames that are members of this group, separated by commas.




          Having numeric user IDs in this list doesn't seem to work.




          I think you have to use something like



          sudo gpasswd -a $USER developers


          or



          sudo usermod $USER -aG developers


          to actually add yourself to the developers group.



          After that, logout and re-login, then use



          id -Gn


          to get a list of your groups.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 28 at 22:55









          Byte Commander

          59.5k26159267




          59.5k26159267










          answered Mar 28 at 21:41









          Ravexina

          28k146595




          28k146595











          • but to run sudo gpasswd i will need root access which i don't have
            – ThunderRoid
            Mar 28 at 21:53










          • @ThunderRoid You have to ask the administrator then... because you are not really in developers group.
            – Ravexina
            Mar 28 at 21:56











          • but grep developers /etc/group shows that i am, because it has my uid, as u can see in op
            – ThunderRoid
            Mar 28 at 21:57






          • 1




            There should be a list of the "usernames" not "user id", I tested it on my local machine... uid does not works. I also quoted a line from /etc/group manual page: " a list of the usernames that are members of this group, separated by commas."
            – Ravexina
            Mar 28 at 21:59






          • 1




            I edited your answer to emphasize that one has to put the user names into /etc/groups, not the UIDs. At least for me, that wasn't too clear until I saw your comment above. Btw, another (more common?) command to add a USER to a GROUP is sudo adduser USER GROUP.
            – Byte Commander
            Mar 28 at 22:57
















          • but to run sudo gpasswd i will need root access which i don't have
            – ThunderRoid
            Mar 28 at 21:53










          • @ThunderRoid You have to ask the administrator then... because you are not really in developers group.
            – Ravexina
            Mar 28 at 21:56











          • but grep developers /etc/group shows that i am, because it has my uid, as u can see in op
            – ThunderRoid
            Mar 28 at 21:57






          • 1




            There should be a list of the "usernames" not "user id", I tested it on my local machine... uid does not works. I also quoted a line from /etc/group manual page: " a list of the usernames that are members of this group, separated by commas."
            – Ravexina
            Mar 28 at 21:59






          • 1




            I edited your answer to emphasize that one has to put the user names into /etc/groups, not the UIDs. At least for me, that wasn't too clear until I saw your comment above. Btw, another (more common?) command to add a USER to a GROUP is sudo adduser USER GROUP.
            – Byte Commander
            Mar 28 at 22:57















          but to run sudo gpasswd i will need root access which i don't have
          – ThunderRoid
          Mar 28 at 21:53




          but to run sudo gpasswd i will need root access which i don't have
          – ThunderRoid
          Mar 28 at 21:53












          @ThunderRoid You have to ask the administrator then... because you are not really in developers group.
          – Ravexina
          Mar 28 at 21:56





          @ThunderRoid You have to ask the administrator then... because you are not really in developers group.
          – Ravexina
          Mar 28 at 21:56













          but grep developers /etc/group shows that i am, because it has my uid, as u can see in op
          – ThunderRoid
          Mar 28 at 21:57




          but grep developers /etc/group shows that i am, because it has my uid, as u can see in op
          – ThunderRoid
          Mar 28 at 21:57




          1




          1




          There should be a list of the "usernames" not "user id", I tested it on my local machine... uid does not works. I also quoted a line from /etc/group manual page: " a list of the usernames that are members of this group, separated by commas."
          – Ravexina
          Mar 28 at 21:59




          There should be a list of the "usernames" not "user id", I tested it on my local machine... uid does not works. I also quoted a line from /etc/group manual page: " a list of the usernames that are members of this group, separated by commas."
          – Ravexina
          Mar 28 at 21:59




          1




          1




          I edited your answer to emphasize that one has to put the user names into /etc/groups, not the UIDs. At least for me, that wasn't too clear until I saw your comment above. Btw, another (more common?) command to add a USER to a GROUP is sudo adduser USER GROUP.
          – Byte Commander
          Mar 28 at 22:57




          I edited your answer to emphasize that one has to put the user names into /etc/groups, not the UIDs. At least for me, that wasn't too clear until I saw your comment above. Btw, another (more common?) command to add a USER to a GROUP is sudo adduser USER GROUP.
          – Byte Commander
          Mar 28 at 22:57

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1020103%2flinux-ubuntu-permission-confusion%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491