LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File permissions (https://www.linuxquestions.org/questions/linux-newbie-8/file-permissions-823049/)

Rameses 07-30-2010 09:50 AM

File permissions
 
Newbie question:
Let's say we have a folder called: /var/admin/ and only admin has access to it. If we have another folder called /var/admin/user/ how can we give access to a specific user to the "user" folder only?

sem007 07-30-2010 10:03 AM

Can you please explain bit more?

what permission set on /var/admin and what permission you want to set on /var/admin/user directory ?

Rameses 07-30-2010 10:08 AM

Let's say we have two users: admin and user
We want "admin" to have (rwx) access to /var/admin/ directory and "user" to have (rwx) access to /var/admin/user/ directory only. So the "user" cannot access /var/admin/ folder.

sem007 07-30-2010 10:21 AM

Quote:

Originally Posted by Rameses (Post 4050136)
Let's say we have two users: admin and user
We want "admin" to have (rwx) access to /var/admin/ directory and "user" to have (rwx) access to /var/admin/user/ directory only. So the "user" cannot access /var/admin/ folder.

You mean to say only admin user have 7 (rwx) permission on /var/admin dir. and other users has 0 (no permission) am i right? As per my view this is not possible to set full access on sub dir. without read access on parent.

sethusubbiah 07-30-2010 10:28 AM

If i didnt get it wrong. You mean to say, There are 2 folders on the same machine /path/to/admin and /path/to/admin/user. The user should have no rights on the admin folder??

I think the easiest way to restrict access to the user is by not providing him sudo access. Then you can look at this link , for more info regarding giving permissions

http://www.yolinux.com/TUTORIALS/Lin...ingGroups.html


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