Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I can define users' file permissions through chmod 777 (aka all rwx). However, how do we define permissions for 'Groups'? How is 'Groups' normally used in the security aspect? What is 'Groups' 's purpose?
Suppose you have a staging server. You have 20 users on that box but only 5 of them have access to modify files and whatnot in a certain directory (let's just call the directory "pre_live"). You give the permissions to "pre_live and all files/subfolders" as 775 (rwx-rwx-rx) and as group "staging". You put Joe,Jane,Mary,Steve,and Rick in group staging. That means now, those 5 people are the only ones that can write/modify files in that directory while all others can just execute/read the files. That's how groups work.
If "pre_live and all files/subfolders" have permissions 755 (rwx-rx-rx), will these 5 people have rwx permission or rx permission, assuming they are the owners (rwx permission) of the files and belonging to the same group (rx permission)?
Thanks !
Quote:
Originally posted by twantrd Suppose you have a staging server. You have 20 users on that box but only 5 of them have access to modify files and whatnot in a certain directory (let's just call the directory "pre_live"). You give the permissions to "pre_live and all files/subfolders" as 775 (rwx-rwx-rx) and as group "staging". You put Joe,Jane,Mary,Steve,and Rick in group staging. That means now, those 5 people are the only ones that can write/modify files in that directory while all others can just execute/read the files. That's how groups work.
Instead of using numbers you can use letters: chmod u+rwx ..... gives all permission to the user. chmod g+rx gives read/excecution permissions to a group. chmod ug-w removes writting permissions for user and group, and so on...
rwxrw-r--
Where
rwx is for owner of the file(user who owns it)
rw- is for other users of group
r-- is for those who are not in thefiles group
So john is the owner of the file and he have the permission rwx
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.