LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Group Control (https://www.linuxquestions.org/questions/linux-newbie-8/group-control-851528/)

elainelaw 12-21-2010 02:33 AM

Group Control
 
I have a file the owner is root:root ( mode is 644 ) , I want to release read & write permission to a non root user ( eg. admin_usr ) , I tried to create a specific group ( eg. ADM ) and release it to root user and admin_usr ( by adding this users to ADM in /etc/group ) , but it is not work , can advise if preserve the file mode to 644 , is it ok ? how to do it if I want to have read & write permission in my case ?

EricTRA 12-21-2010 02:49 AM

Hello,

Have a look at the following articles about ACL, I'm sure you'll be able to configure just what you need/want with them. The packages/commands discussed offer you possibilities beyond the standard ones on file permissions.

Linux File Security
Know your rights

Kind regards,

Eric

JoshyJ 12-21-2010 06:00 AM

So are you wanting only root to have access to the file? If you just want the owner root to have access, you could make the permissions 600.

Maybe I am misunderstanding what you want to do.

chrism01 12-21-2010 07:46 PM

To enable the orig soln, you'd have to change the group owner of the file to the new grp ADM:

Code:

chown root:ADM filename

raviteja_s 12-23-2010 12:22 PM

change the group ownership

chgrp ADM file1name


gpasswd -M admin_usr ADM

devnull10 12-23-2010 02:42 PM

Quote:

I want to release read & write permission to a non root user
What I think this means is that currently only root can read/write but you want another user (who is a member of admin_usr) to be able to?

In which case the above (chgrp) will still retain the existing permissions on the file (ie, 644). You will need to:
Code:

chmod 664 FILENAME
or
chmod g+rw FILENAME

so that the group has rw.


All times are GMT -5. The time now is 07:24 AM.