LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Write permissions to a specific user on a folder (https://www.linuxquestions.org/questions/linux-newbie-8/write-permissions-to-a-specific-user-on-a-folder-858510/)

gsvsmanyam 01-25-2011 06:17 AM

Write permissions to a specific user on a folder
 
I need to allow a user to copy the content from Windows system to Linux system using WinSCP and rest of the users should only read. I configured that folder as a restricted except for use of read purpose only. How to allow a specific to update that folder by assigning write privileges to that folder?

Example: user 'A' should have write permissions to the folder 'DOCS' and any other user should only have read permission.

Could any one suggest?

zer0signal 01-25-2011 07:10 AM

Very Simple.

chmod u+wr /docs - that will change the "user" to have RW
chmod go+r /docs - that will tell groups and others they can only read that folder
chown user:user /docs - that will make 'user' the owner of the Doc Folder

insert 'user' with the account name you want to give permission to that folder

gsvsmanyam 01-25-2011 08:17 AM

Hi zer0signal,

Thanks for reply. I am aware of what you said. What I need is, to assign write permissions for user 'A' to copy or remove data from that folder. Rest of the users shouldn't have write permissions. This is to assign permissions for user 'A' to copy or delete data to a folder which is the home folder for ftp. To enable user 'A' to write data to that folder, without interference of the admin. At the same time, rest of the users should only have read permission. Hope you got my clutch.

Thank you

zer0signal 01-25-2011 08:44 AM

So
chown a:a /Doc
chmod u+rw /Doc
chmod o+r /Doc

if you wanna get into finer grain control for user A
you can use the setfacl and getfacl

but all i am doing with the above is setting user 'a' and group 'a' to own that doc directory, and then specifying the other's 'world users' to only have read permission while user 'A' has rw to that folder


All times are GMT -5. The time now is 11:13 PM.