How do I display the owner, groups and permissions for a user in bash?












2















Is there a specific command that will display the owner, group, and permissions for a user or will I need to run more than one command?



I just created the user "guest" in the /home/ directory and would like to display this information. What command(s) can I use to find out this information? Are there even ownership for users or does that only apply to directories?










share|improve this question

























  • Owner group and permissions are associated with files, not users, so you probably want something like ls -ld /home/guest

    – thrig
    Mar 21 '17 at 14:15
















2















Is there a specific command that will display the owner, group, and permissions for a user or will I need to run more than one command?



I just created the user "guest" in the /home/ directory and would like to display this information. What command(s) can I use to find out this information? Are there even ownership for users or does that only apply to directories?










share|improve this question

























  • Owner group and permissions are associated with files, not users, so you probably want something like ls -ld /home/guest

    – thrig
    Mar 21 '17 at 14:15














2












2








2








Is there a specific command that will display the owner, group, and permissions for a user or will I need to run more than one command?



I just created the user "guest" in the /home/ directory and would like to display this information. What command(s) can I use to find out this information? Are there even ownership for users or does that only apply to directories?










share|improve this question
















Is there a specific command that will display the owner, group, and permissions for a user or will I need to run more than one command?



I just created the user "guest" in the /home/ directory and would like to display this information. What command(s) can I use to find out this information? Are there even ownership for users or does that only apply to directories?







permissions users group accounts






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 13 at 21:19









Rui F Ribeiro

39.5k1479133




39.5k1479133










asked Mar 21 '17 at 0:09









JdubJdub

112




112













  • Owner group and permissions are associated with files, not users, so you probably want something like ls -ld /home/guest

    – thrig
    Mar 21 '17 at 14:15



















  • Owner group and permissions are associated with files, not users, so you probably want something like ls -ld /home/guest

    – thrig
    Mar 21 '17 at 14:15

















Owner group and permissions are associated with files, not users, so you probably want something like ls -ld /home/guest

– thrig
Mar 21 '17 at 14:15





Owner group and permissions are associated with files, not users, so you probably want something like ls -ld /home/guest

– thrig
Mar 21 '17 at 14:15










2 Answers
2






active

oldest

votes


















3















  1. Owner: None, users do not have owners.



  2. Groups:



    groups guest



  3. Permissions (Gnome GUI, part of gnome-system-tools package on Ubuntu variants):



    users-admin







share|improve this answer































    2














    Permissions are for files and directories. There are separate permissions for the owner and a group. Users can belong to groups.



    To show the permissions for files and directories:



    ls -l <filename | directory>


    To show the groups a user belongs to



    groups <username>





    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%2f352710%2fhow-do-i-display-the-owner-groups-and-permissions-for-a-user-in-bash%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















      1. Owner: None, users do not have owners.



      2. Groups:



        groups guest



      3. Permissions (Gnome GUI, part of gnome-system-tools package on Ubuntu variants):



        users-admin







      share|improve this answer




























        3















        1. Owner: None, users do not have owners.



        2. Groups:



          groups guest



        3. Permissions (Gnome GUI, part of gnome-system-tools package on Ubuntu variants):



          users-admin







        share|improve this answer


























          3












          3








          3








          1. Owner: None, users do not have owners.



          2. Groups:



            groups guest



          3. Permissions (Gnome GUI, part of gnome-system-tools package on Ubuntu variants):



            users-admin







          share|improve this answer














          1. Owner: None, users do not have owners.



          2. Groups:



            groups guest



          3. Permissions (Gnome GUI, part of gnome-system-tools package on Ubuntu variants):



            users-admin








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 21 '17 at 0:20









          agcagc

          4,62811036




          4,62811036

























              2














              Permissions are for files and directories. There are separate permissions for the owner and a group. Users can belong to groups.



              To show the permissions for files and directories:



              ls -l <filename | directory>


              To show the groups a user belongs to



              groups <username>





              share|improve this answer




























                2














                Permissions are for files and directories. There are separate permissions for the owner and a group. Users can belong to groups.



                To show the permissions for files and directories:



                ls -l <filename | directory>


                To show the groups a user belongs to



                groups <username>





                share|improve this answer


























                  2












                  2








                  2







                  Permissions are for files and directories. There are separate permissions for the owner and a group. Users can belong to groups.



                  To show the permissions for files and directories:



                  ls -l <filename | directory>


                  To show the groups a user belongs to



                  groups <username>





                  share|improve this answer













                  Permissions are for files and directories. There are separate permissions for the owner and a group. Users can belong to groups.



                  To show the permissions for files and directories:



                  ls -l <filename | directory>


                  To show the groups a user belongs to



                  groups <username>






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 21 '17 at 0:20









                  Stephen RauchStephen Rauch

                  3,338101428




                  3,338101428






























                      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%2f352710%2fhow-do-i-display-the-owner-groups-and-permissions-for-a-user-in-bash%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

                      How to make a Squid Proxy server?

                      Is this a new Fibonacci Identity?

                      Touch on Surface Book