chown does not give me any right

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 folder, my-folder.
From its parent directory, I first do:



sudo chown -cR matthewslouismarie: my-folder


If I then do: chmod -cR 600 my-folder, I get:



chmod: cannot access 'my-folder/build.sh': Permission denied
chmod: cannot access 'my-folder/vmdk': Permission denied
chmod: cannot access 'my-folder/.git': Permission denied
chmod: cannot access 'my-folder/run.sh': Permission denied
chmod: cannot access 'my-folder/docker': Permission denied
chmod: cannot access 'my-folder/.gitignore': Permission denied


Am I not supposed to fully own this folder and its content?



Notes:



Running sudo chmod -cR 600 my-folder does not print anything. matthewslouismarie is what I get when I type whoami.







share|improve this question
























    up vote
    0
    down vote

    favorite












    I have a folder, my-folder.
    From its parent directory, I first do:



    sudo chown -cR matthewslouismarie: my-folder


    If I then do: chmod -cR 600 my-folder, I get:



    chmod: cannot access 'my-folder/build.sh': Permission denied
    chmod: cannot access 'my-folder/vmdk': Permission denied
    chmod: cannot access 'my-folder/.git': Permission denied
    chmod: cannot access 'my-folder/run.sh': Permission denied
    chmod: cannot access 'my-folder/docker': Permission denied
    chmod: cannot access 'my-folder/.gitignore': Permission denied


    Am I not supposed to fully own this folder and its content?



    Notes:



    Running sudo chmod -cR 600 my-folder does not print anything. matthewslouismarie is what I get when I type whoami.







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a folder, my-folder.
      From its parent directory, I first do:



      sudo chown -cR matthewslouismarie: my-folder


      If I then do: chmod -cR 600 my-folder, I get:



      chmod: cannot access 'my-folder/build.sh': Permission denied
      chmod: cannot access 'my-folder/vmdk': Permission denied
      chmod: cannot access 'my-folder/.git': Permission denied
      chmod: cannot access 'my-folder/run.sh': Permission denied
      chmod: cannot access 'my-folder/docker': Permission denied
      chmod: cannot access 'my-folder/.gitignore': Permission denied


      Am I not supposed to fully own this folder and its content?



      Notes:



      Running sudo chmod -cR 600 my-folder does not print anything. matthewslouismarie is what I get when I type whoami.







      share|improve this question












      I have a folder, my-folder.
      From its parent directory, I first do:



      sudo chown -cR matthewslouismarie: my-folder


      If I then do: chmod -cR 600 my-folder, I get:



      chmod: cannot access 'my-folder/build.sh': Permission denied
      chmod: cannot access 'my-folder/vmdk': Permission denied
      chmod: cannot access 'my-folder/.git': Permission denied
      chmod: cannot access 'my-folder/run.sh': Permission denied
      chmod: cannot access 'my-folder/docker': Permission denied
      chmod: cannot access 'my-folder/.gitignore': Permission denied


      Am I not supposed to fully own this folder and its content?



      Notes:



      Running sudo chmod -cR 600 my-folder does not print anything. matthewslouismarie is what I get when I type whoami.









      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 31 at 19:05









      Louis-Marie Matthews

      1032




      1032




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          As @andyDalton says you need x (execute) permissions to look in a directory.



          Therefore you could set permission to 700 however that will set x on regular file.



          If you have gnu chmod, then you can use symbolic mode:



          chmod -cR u+rwX my-folder


          This will only add to the user permission, and will only add x if it as a directory or already exists on group or other.



          Also consider if you need to use chmod. It may already be how you want it. chown does not reset it.






          share|improve this answer




















          • Seems to be perfect! It only adds the execute flag if it's a directory right?
            – Louis-Marie Matthews
            Feb 2 at 15:59










          • +X adds x to directories or to files that already have x set somewhere else (in u,g, or o).
            – ctrl-alt-delor
            Feb 2 at 16:22

















          up vote
          4
          down vote













          The x permission on directories is what controls whether or not a user can traverse into that directory. By using mode 600, you've removed the x bit, and therefore cannot traverse into the directory.



          Try this:



          find my-folder -type d -exec chmod 700 ;


          That will change the permissions for the various directories back to 700 (rwx------). If you want files to be 600, similarly, you could do:



          find my-folder -type f -exec chmod 600 ;





          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%2f421046%2fchown-does-not-give-me-any-right%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
            1
            down vote



            accepted










            As @andyDalton says you need x (execute) permissions to look in a directory.



            Therefore you could set permission to 700 however that will set x on regular file.



            If you have gnu chmod, then you can use symbolic mode:



            chmod -cR u+rwX my-folder


            This will only add to the user permission, and will only add x if it as a directory or already exists on group or other.



            Also consider if you need to use chmod. It may already be how you want it. chown does not reset it.






            share|improve this answer




















            • Seems to be perfect! It only adds the execute flag if it's a directory right?
              – Louis-Marie Matthews
              Feb 2 at 15:59










            • +X adds x to directories or to files that already have x set somewhere else (in u,g, or o).
              – ctrl-alt-delor
              Feb 2 at 16:22














            up vote
            1
            down vote



            accepted










            As @andyDalton says you need x (execute) permissions to look in a directory.



            Therefore you could set permission to 700 however that will set x on regular file.



            If you have gnu chmod, then you can use symbolic mode:



            chmod -cR u+rwX my-folder


            This will only add to the user permission, and will only add x if it as a directory or already exists on group or other.



            Also consider if you need to use chmod. It may already be how you want it. chown does not reset it.






            share|improve this answer




















            • Seems to be perfect! It only adds the execute flag if it's a directory right?
              – Louis-Marie Matthews
              Feb 2 at 15:59










            • +X adds x to directories or to files that already have x set somewhere else (in u,g, or o).
              – ctrl-alt-delor
              Feb 2 at 16:22












            up vote
            1
            down vote



            accepted







            up vote
            1
            down vote



            accepted






            As @andyDalton says you need x (execute) permissions to look in a directory.



            Therefore you could set permission to 700 however that will set x on regular file.



            If you have gnu chmod, then you can use symbolic mode:



            chmod -cR u+rwX my-folder


            This will only add to the user permission, and will only add x if it as a directory or already exists on group or other.



            Also consider if you need to use chmod. It may already be how you want it. chown does not reset it.






            share|improve this answer












            As @andyDalton says you need x (execute) permissions to look in a directory.



            Therefore you could set permission to 700 however that will set x on regular file.



            If you have gnu chmod, then you can use symbolic mode:



            chmod -cR u+rwX my-folder


            This will only add to the user permission, and will only add x if it as a directory or already exists on group or other.



            Also consider if you need to use chmod. It may already be how you want it. chown does not reset it.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 31 at 19:33









            ctrl-alt-delor

            8,79031947




            8,79031947











            • Seems to be perfect! It only adds the execute flag if it's a directory right?
              – Louis-Marie Matthews
              Feb 2 at 15:59










            • +X adds x to directories or to files that already have x set somewhere else (in u,g, or o).
              – ctrl-alt-delor
              Feb 2 at 16:22
















            • Seems to be perfect! It only adds the execute flag if it's a directory right?
              – Louis-Marie Matthews
              Feb 2 at 15:59










            • +X adds x to directories or to files that already have x set somewhere else (in u,g, or o).
              – ctrl-alt-delor
              Feb 2 at 16:22















            Seems to be perfect! It only adds the execute flag if it's a directory right?
            – Louis-Marie Matthews
            Feb 2 at 15:59




            Seems to be perfect! It only adds the execute flag if it's a directory right?
            – Louis-Marie Matthews
            Feb 2 at 15:59












            +X adds x to directories or to files that already have x set somewhere else (in u,g, or o).
            – ctrl-alt-delor
            Feb 2 at 16:22




            +X adds x to directories or to files that already have x set somewhere else (in u,g, or o).
            – ctrl-alt-delor
            Feb 2 at 16:22












            up vote
            4
            down vote













            The x permission on directories is what controls whether or not a user can traverse into that directory. By using mode 600, you've removed the x bit, and therefore cannot traverse into the directory.



            Try this:



            find my-folder -type d -exec chmod 700 ;


            That will change the permissions for the various directories back to 700 (rwx------). If you want files to be 600, similarly, you could do:



            find my-folder -type f -exec chmod 600 ;





            share|improve this answer
























              up vote
              4
              down vote













              The x permission on directories is what controls whether or not a user can traverse into that directory. By using mode 600, you've removed the x bit, and therefore cannot traverse into the directory.



              Try this:



              find my-folder -type d -exec chmod 700 ;


              That will change the permissions for the various directories back to 700 (rwx------). If you want files to be 600, similarly, you could do:



              find my-folder -type f -exec chmod 600 ;





              share|improve this answer






















                up vote
                4
                down vote










                up vote
                4
                down vote









                The x permission on directories is what controls whether or not a user can traverse into that directory. By using mode 600, you've removed the x bit, and therefore cannot traverse into the directory.



                Try this:



                find my-folder -type d -exec chmod 700 ;


                That will change the permissions for the various directories back to 700 (rwx------). If you want files to be 600, similarly, you could do:



                find my-folder -type f -exec chmod 600 ;





                share|improve this answer












                The x permission on directories is what controls whether or not a user can traverse into that directory. By using mode 600, you've removed the x bit, and therefore cannot traverse into the directory.



                Try this:



                find my-folder -type d -exec chmod 700 ;


                That will change the permissions for the various directories back to 700 (rwx------). If you want files to be 600, similarly, you could do:



                find my-folder -type f -exec chmod 600 ;






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 31 at 19:08









                Andy Dalton

                4,7561520




                4,7561520






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f421046%2fchown-does-not-give-me-any-right%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?