LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2011, 07:17 AM   #1
gsvsmanyam
LQ Newbie
 
Registered: Jun 2009
Location: Hyderabad
Distribution: Suse (rarely Redhat & Fedora)
Posts: 14

Rep: Reputation: 0
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?
 
Old 01-25-2011, 08:10 AM   #2
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
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
 
Old 01-25-2011, 09:17 AM   #3
gsvsmanyam
LQ Newbie
 
Registered: Jun 2009
Location: Hyderabad
Distribution: Suse (rarely Redhat & Fedora)
Posts: 14

Original Poster
Rep: Reputation: 0
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
 
Old 01-25-2011, 09:44 AM   #4
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
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

Last edited by zer0signal; 01-25-2011 at 09:56 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Write a script to move specific files in various folders to one folder linuxisthedevil Linux - General 13 11-18-2010 07:29 AM
Granting full read/write permissions to all files for a specific user laserjim Linux - Security 10 01-31-2009 12:17 PM
Automatically set permissions of new files created within a specific folder Lorian Linux - Desktop 2 03-03-2007 04:17 PM
I can not open the user folder in home and write in a shared folder jorge_ivan Linux - General 8 08-02-2006 12:28 PM
Permissions: giving specific groups write access to a directory kinetik Linux - General 3 07-06-2006 09:30 AM


All times are GMT -5. The time now is 11:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration