setgid bit question

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 question about the setgid on a file. The following example file has these permissions with the GID set.



-r-xr-sr-x root mail 829672 Jun 4 2014 hoststat


I understand that the GID transfers group ownership to the directory that the file is part and users are granted access based on the owning directories permissions. So would this make the owner permissions on this file less restrictive than the group permissions? I'm thinking it does not make the owners permissions less restrictive because you're allowing users more access based on the owning directories permissions, but I'm not sure if I'm right.







share|improve this question

























    up vote
    0
    down vote

    favorite












    I have a question about the setgid on a file. The following example file has these permissions with the GID set.



    -r-xr-sr-x root mail 829672 Jun 4 2014 hoststat


    I understand that the GID transfers group ownership to the directory that the file is part and users are granted access based on the owning directories permissions. So would this make the owner permissions on this file less restrictive than the group permissions? I'm thinking it does not make the owners permissions less restrictive because you're allowing users more access based on the owning directories permissions, but I'm not sure if I'm right.







    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a question about the setgid on a file. The following example file has these permissions with the GID set.



      -r-xr-sr-x root mail 829672 Jun 4 2014 hoststat


      I understand that the GID transfers group ownership to the directory that the file is part and users are granted access based on the owning directories permissions. So would this make the owner permissions on this file less restrictive than the group permissions? I'm thinking it does not make the owners permissions less restrictive because you're allowing users more access based on the owning directories permissions, but I'm not sure if I'm right.







      share|improve this question













      I have a question about the setgid on a file. The following example file has these permissions with the GID set.



      -r-xr-sr-x root mail 829672 Jun 4 2014 hoststat


      I understand that the GID transfers group ownership to the directory that the file is part and users are granted access based on the owning directories permissions. So would this make the owner permissions on this file less restrictive than the group permissions? I'm thinking it does not make the owners permissions less restrictive because you're allowing users more access based on the owning directories permissions, but I'm not sure if I'm right.









      share|improve this question












      share|improve this question




      share|improve this question








      edited May 8 at 16:46









      maulinglawns

      5,1231821




      5,1231821









      asked May 8 at 16:27









      Randy Teer

      61




      61




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          The setgid bit on files have nothing to do with directories. The setgid bit in your example means that the hoststat executable is run with a group id set to the I'd of the mail group, presumably because it needs controlled access to files or directories owned by group mail.






          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: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f442592%2fsetgid-bit-question%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













            The setgid bit on files have nothing to do with directories. The setgid bit in your example means that the hoststat executable is run with a group id set to the I'd of the mail group, presumably because it needs controlled access to files or directories owned by group mail.






            share|improve this answer

























              up vote
              1
              down vote













              The setgid bit on files have nothing to do with directories. The setgid bit in your example means that the hoststat executable is run with a group id set to the I'd of the mail group, presumably because it needs controlled access to files or directories owned by group mail.






              share|improve this answer























                up vote
                1
                down vote










                up vote
                1
                down vote









                The setgid bit on files have nothing to do with directories. The setgid bit in your example means that the hoststat executable is run with a group id set to the I'd of the mail group, presumably because it needs controlled access to files or directories owned by group mail.






                share|improve this answer













                The setgid bit on files have nothing to do with directories. The setgid bit in your example means that the hoststat executable is run with a group id set to the I'd of the mail group, presumably because it needs controlled access to files or directories owned by group mail.







                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered May 8 at 17:43









                Johan Myréen

                6,74711221




                6,74711221






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442592%2fsetgid-bit-question%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?