LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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

Reply
 
Search this Thread
Old 11-14-2005, 02:17 AM   #1
Akhran
Member
 
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208

Rep: Reputation: 30
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 !
 
Old 11-14-2005, 03:02 AM   #2
prabuayyappan
Member
 
Registered: Sep 2005
Location: Coimbatore
Distribution: Prabuayyappan
Posts: 32

Rep: Reputation: 15
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
 
Old 11-14-2005, 03:29 AM   #3
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,438

Rep: Reputation: 52
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
 
Old 11-14-2005, 04:12 AM   #4
Akhran
Member
 
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208

Original Poster
Rep: Reputation: 30
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
 
Old 11-14-2005, 06:25 AM   #5
enemorales
Member
 
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Ubuntu
Posts: 410

Rep: Reputation: 30
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...
 
Old 11-14-2005, 06:49 AM   #6
Akhran
Member
 
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208

Original Poster
Rep: Reputation: 30
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
 
Old 11-14-2005, 07:55 AM   #7
prabuayyappan
Member
 
Registered: Sep 2005
Location: Coimbatore
Distribution: Prabuayyappan
Posts: 32

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
user/group permissions prozac Linux - Newbie 4 11-20-2005 11:49 PM
How to set permissions for a specific group? tigerhuang Linux - Security 1 12-10-2004 05:59 PM
How do I set permissions on a group rwalkerphl Linux - Newbie 4 06-22-2004 04:44 PM
How to view set-user-ID and set-group-ID Xris718 Linux - General 7 01-10-2004 01:44 PM
user/group permissions Diane Welch Linux - Newbie 3 05-08-2001 07:03 AM


All times are GMT -5. The time now is 08:50 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration