LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-17-2011, 06:50 AM   #1
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
query on user group permission


Hello All,

This is just for personal practice

I am trying to learn about permission implementation in linux.
My distro is RHEL 5.2

How can we give permissions to multiple groups on a single folder
Suppose I have groups test1, test2, test3

Code:
group test1 --------> should have full access
group test2 --------> should have read only
group test3 --------> should have read and write


I have to implement permission on file.txt

Code:
#mkdir /example
#touch file.txt
#ls -l
-rwxr----- 1 root root 23 Nov 17 02:40 file.txt
Now what am I suppose to do?
be default the owner and group of file.txt is root, which I can change to any other group but how is it possible to assign permissions to multiple groups for single file?
 
Old 11-17-2011, 06:51 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
you'd be looking at filesystems with ACL management enabled. http://www.centos.org/docs/5/html/De...S/ch-acls.html
 
1 members found this post helpful.
Old 11-17-2011, 07:00 AM   #3
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Original Poster
Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by acid_kewpie View Post
you'd be looking at filesystems with ACL management enabled. http://www.centos.org/docs/5/html/De...S/ch-acls.html
So basically through chmod and chown it is not possible right?
 
Old 11-17-2011, 07:02 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well by default a posix file only holds a single user and group. Where do you propose that data would be? Sometimes it's possible to contrive a scenario where the directory is owned by one group, the file by another, but very rarely and it's all just so contrived.
 
1 members found this post helpful.
Old 11-17-2011, 07:16 AM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Original Poster
Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by acid_kewpie View Post
well by default a posix file only holds a single user and group. Where do you propose that data would be? Sometimes it's possible to contrive a scenario where the directory is owned by one group, the file by another, but very rarely and it's all just so contrived.
Thanks for that info..was really very helpful
Please don't mind if the question sounds silly

you have mentioned POSIX file, does that means that instead of file if it were a directory we could have given permissions to multiple groups?

and if I am not mistaken getfacl is used to view the acls or is there any other function of getfacl?
 
Old 11-17-2011, 07:17 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
I just mean the set of attributes provided by posix compliant filesystems.. file and directories.
 
  


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 permission confusion A32 Linux - Newbie 12 08-31-2014 08:46 PM
lp permission assign to user group syedali Linux - Desktop 0 08-06-2011 04:17 AM
How can we set permission type on a file to a particular user in a group ? rakeshkumar.techie Linux - Newbie 3 01-20-2011 10:30 AM
can i give directory permission to a group and not specific user? SamuraiCoder Linux - Newbie 5 05-26-2010 05:23 PM
smb permission for (sub)user group mweil Linux - Networking 0 07-23-2004 08:59 AM


All times are GMT -5. The time now is 04:46 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration