Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
11-14-2005, 02:17 AM
|
#1
|
Member
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208
Rep:
|
How to set the permissions for a user Group?
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?
Thanks !
|
|
|
11-14-2005, 03:02 AM
|
#2
|
Member
Registered: Sep 2005
Location: Coimbatore
Distribution: Prabuayyappan
Posts: 32
Rep:
|
chmod -- This changes the permission of files,not only for users but also to groups
Better you look at the man page for chmod you will get an idea
|
|
|
11-14-2005, 03:29 AM
|
#3
|
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440
Rep:
|
Quote:
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.
-twantrd
|
|
|
11-14-2005, 04:12 AM
|
#4
|
Member
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208
Original Poster
Rep:
|
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.
-twantrd
|
|
|
|
11-14-2005, 06:25 AM
|
#5
|
Member
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Ubuntu
Posts: 410
Rep:
|
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...
|
|
|
11-14-2005, 06:49 AM
|
#6
|
Member
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208
Original Poster
Rep:
|
If I have a file (payroll) with the following permissions and ownership:
-rwxrw-r-- 1 John Accts 100 2005-11-05 07:50 payroll
and John belongs to Accts group, would he have rwx or rw permission on the file?
Thanks for your patience 
|
|
|
11-14-2005, 07:55 AM
|
#7
|
Member
Registered: Sep 2005
Location: Coimbatore
Distribution: Prabuayyappan
Posts: 32
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 08:06 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|