LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-15-2006, 12:03 PM   #1
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Rep: Reputation: 30
how to give user bigger write permissions


lo there all,
i have a user that needs to be able to write to many different files that usually only the root user would be able to do.
for example, i need to be able to write to /usr/lib/python/site_packages to put system wide access to python modules.
also needs to be able to edit scripts in the /var/www folder owned by www-data
also need to be able to edit scripts in agi_bin for asterisk and write software that can write files to the aseterisk directory.

so, how do i give said user permission to edit, read, delete etc... files in all of these directories ?

thanks for any tips.
 
Old 12-15-2006, 12:35 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
You could create a new group, set the group write permission on the files you require that user to have access to and change the group of the files accordingly.
 
Old 12-15-2006, 12:36 PM   #3
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
You can probably use groups to do that. Make a list of the files you want access to and their current owners. Create a new group, say "access", and make your user and all the current owners of those files members of the access group. Change the group ownership of those files to the access group and give the access group rwx permissions on those files.
 
Old 12-15-2006, 12:40 PM   #4
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Original Poster
Rep: Reputation: 30
ok, if i create an access group, can i have directories belong to that group? then files can be created in that group ?

also, if i change ownership of say /var/www to access will that mess up the group www-data from having the access to that folder to run the web server ?

or would it be easier to add the user to all the groups necessary (www-data, asterisk, ftp-user, etc..)
thanks
 
Old 12-15-2006, 12:55 PM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
What is the owner and group of these files at present? root / www-data? If so, maybe it's enough to add your user to the www-data group.

Note that you have to log the user out and in again for new group settings to take effect.
 
Old 12-15-2006, 12:57 PM   #6
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
You can, of course, use ACLs.
Using ACLs, you can give explicit permissions to a specifc user or users, besides the regular access mode.
Check if your kernel and filesystem support ACLs and check the setfacl and getfacl man pages.

It is better than mess you groups just for a few users/files.
 
  


Reply



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
Mounted a filesystem as root.How does one give write-permission to a user? Mr.DeVillie Linux - Software 4 02-08-2006 07:20 AM
Give user write access to htdocs kvnband Linux - Security 9 12-30-2005 01:35 PM
how to give a nonroot user write access Kilahchris Linux - Newbie 8 05-11-2005 02:10 AM
My user account has no write permissions guitarfella Slackware 2 12-15-2004 12:08 AM
give users permissions to write dragosp Linux - Security 2 09-12-2004 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:50 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
Open Source Consulting | Domain Registration