cancel
Showing results for 
Search instead for 
Did you mean: 

file permission.

 
SOLVED
Go to solution
fizan
Super Advisor

file permission.

I have 2 users on the system.

User 1 owns folder /logs.

I would like User 2 to access/read/write to the folder /logs.

only user 2, no other users should access the /logs.
4 REPLIES
Michael Steele_2
Honored Contributor
Solution

Re: file permission.

Hi

make a new group, add the 2 users into this new group, keep the other out of it.
Support Fatherhood - Stop Family Law
Raj D.
Honored Contributor

Re: file permission.

fizan,
The easy way would be to create a group and assign group permission to the directory , make user2 as a member of that group.

- Add a group logsgrp
# groupadd -g 5000 logsgrp #(to check gid, it should be uniqe)

- Add user2 to this group.
# usermod -G logsgrp user1
# usermod -G logsgrp user2


-# chown user1:logsgrp /logs
-# chmod g+rwx /logs


- Verify access of user2 to /log by creating or deleting some test file on /log directory.



Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Johnson Punniyalingam
Honored Contributor

Re: file permission.

Sounds like permission control.

create group
add the user1 & user2 to the group
once done

chown user1:share /Logs
chmod g+rwx /logs

Thanks,

Johnson

Problems are common to all, but attitude makes the difference
fizan
Super Advisor

Re: file permission.

thanks

experts got it !!