diff --git a/tutorial/changeowner.org b/tutorial/changeowner.org index 1a9c0d1..e1daf74 100644 --- a/tutorial/changeowner.org +++ b/tutorial/changeowner.org @@ -56,9 +56,9 @@ contains multiple subdirectories. Let's call that directory "buds" I can't access the files without being `root`. This is the outuput in the command line When a list the directory using `ls -la`. - + #+begin_example bash - drw-r--r-- 81 user user 4096 dec 26 06:21 buds + drw-r--r-- 81 user user 4096 dec 26 06:21 buds #+end_example When I go to my git repository and check the change I can see this output for @@ -80,6 +80,23 @@ access the files chmod -R o=wxr,g=xr, o=x buds #+end_src +This will change the permissions for: + + * The owner (4 = read; 2 = write; 1 = execute) + * The group (4 = read) and + * Others (4 = read) + +Use ~-R~ if you want to apply recursive ~chmod~ + +#+begin_src bash + chmod 744 NameOfFileHere +#+end_src + +Think of the following code: what does that code do? + +#+begin_src bash + chmod -R 755 NameOfFileHere +#+end_src *** The output now is: @@ -96,9 +113,15 @@ Remember how it looks before But I still can open the files. That is because need to change the owner: #+begin_example bash - chown -R 755 buds # Try this and check the result - chown -R user buds # Then try this and check the result + chown NameOfownerHere buds # Try this and check the result #+end_example +Include the owner then ~:~ and then the name of the group to change ownership for each one of those users + +#+begin_example bash + chown user:usergroup buds # Then try this and check the result +#+end_example + + ps: should use`sudo` to run this command, so be careful and make a scratch directory to run tests.