Last active
March 16, 2018 22:43
-
-
Save basedalexander/2600e25ac58c88c44f348e7b37421e24 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chomod 720 file_or_dir | |
# 1) 7 - owners rights | |
# 2) 2 - right for users who belongs to the owner's group | |
# 3) 0 - other users | |
# 4 - read | |
# 2 - write | |
# 1 - execute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change the owner of a file | |
# ls -lart tmpfile | |
-rw-r--r-- 1 himanshu family 0 2012-05-22 20:03 tmpfile | |
# chown root tmpfile | |
# ls -l tmpfile | |
-rw-r--r-- 1 root family 0 2012-05-22 20:03 tmpfile | |
# Change the group of a file | |
#ls -l tmpfile | |
-rw-r--r-- 1 himanshu family 0 2012-05-22 20:03 tmpfile | |
chown :friends tmpfile | |
#ls -l tmpfile | |
-rw-r--r-- 1 himanshu friends 0 2012-05-22 20:03 tmpfile | |
# Change both owner and the group | |
# ls -l tmpfile | |
-rw-r--r-- 1 root family 0 2012-05-22 20:03 tmpfile | |
# chown himanshu:friends tmpfile | |
# ls -l tmpfile | |
-rw-r--r-- 1 himanshu friends 0 2012-05-22 20:03 tmpfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment