[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Permissions - CentOS system (Red Had Enterprise)

Posted on 2008-01-31
6
Medium Priority
?
613 Views
Last Modified: 2013-12-06
How can I give read/write permissions on some files and foders to two users from different groups on a CentOS system (Red Had Enterprise)?
0
Comment
Question by:vetrixicode
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:almilyo
ID: 20788978
You can use Access Control Lists to give access to multiple groups. There is a guide at this url:

http://www.linuxtopia.org/online_books/centos_linux_guides/centos_enterprise_linux_sysadmin_guide/s1-acls-setting.html

so running

setfacl -m g:mygroup:rwx /tmp/myfolder

would let give any member  of  'mygroup' rwx rights on  /tmp/myfolder.

0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 20789042
u have to use ACL for this task
u have command call

setfacl -m u:username:<permissions> dirname

example: setfacl -m u:test1:rw testdir

to delete acl u can use
setfacl -x u:username dirname

to display the current acl on directory r file u can use
getfacl dirname (or) filename


To set default Acl on Directoy r file u can use following command

this is like default acl rule on directory for r and execute access on share dir.
setfacl -m d:o:rx dirname

on Redhat EL 4 and 3 r Centos 3 r 4 u have to mount the filesystem with ACL enabled like
mount -t ext3 -o acl <device-name> <partition>
example:mount -t ext3 -o acl /dev/VolGroup00/LogVol02 /work

On Redhat EL5 r Centos EL 5 by default filesystems are enabled with ACL.

gud luck
0
 

Author Comment

by:vetrixicode
ID: 20790265
I run this command (setfacl -m u:www:rw 200801), but displays message "Operation not supported".
what the problem ?
[root@linuxserver1 test]# setfacl -m u:www:rw 200801                  
setfacl: 200801: Operation not supported

Open in new window

0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 20790326
which version of linux r u using Redhat EL4 r 5
0
 

Author Comment

by:vetrixicode
ID: 20790348
Is the version 3
0
 
LVL 14

Accepted Solution

by:
Deepak Kosaraju earned 500 total points
ID: 20790481
u have to enable acl at the filesystem level by default in EL3 and 4 ACL is not enabled at filesystem level use  the following command

 Redhat EL 4 and 3 r Centos 3 r 4 u have to mount the filesystem with ACL enabled like
mount -t ext3 -o acl <device-name> <partition>
example:mount -t ext3 -o acl /dev/VolGroup00/LogVol02 /work

and add this to rc.local file to make setting permanent
after mounting u can use setfacl on enabled filesystem( since i sad filesystem it implies files under it
)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

608 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question