Difference between revisions of "Centos Permissions"
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
chown user1.root file1 | chown user1.root file1 | ||
chown -R user1.root Desktop | chown -R user1.root Desktop | ||
A user who does not have the execute permission to a directory is prevented from listing the directory’s contents, adding and removing files, and working with files and subdirectories inside that directory, regardless of what permissions the user has to them. In short, a quick way to deny a user from accessing a directory and all of its contents in Linux is to take away the execute per- mission on that directory. Because the execute permission on a directory is crucial for user access, it is commonly given to all users via the other category, unless the directory must be private. |
Revision as of 16:01, 5 February 2019
View your current username
whoami
View your group membership
groups
Change Group
chgrp sys file1 chgrp -R sys Desktop
Chown changes ownership and group ownership of a file
chown user1.root file1 chown -R user1.root Desktop
A user who does not have the execute permission to a directory is prevented from listing the directory’s contents, adding and removing files, and working with files and subdirectories inside that directory, regardless of what permissions the user has to them. In short, a quick way to deny a user from accessing a directory and all of its contents in Linux is to take away the execute per- mission on that directory. Because the execute permission on a directory is crucial for user access, it is commonly given to all users via the other category, unless the directory must be private.