LinuxQuestions.org
Review your favorite Linux distribution.
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 12-05-2007, 07:03 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Rep: Reputation: 31
sudo permissions to edit apache's files


Hi!

I would like to configure sudo to allow one specific user to create and change some files that are in a directory (only in this one) and that belongs to user apache.
Those files belong to a webserver and the user would like t be abble to change things in this directory. But the directory and its files belongs to apache. this means that the user should also be allowed to make a chown apache.

how may I configure sudoers?

thanks
 
Old 12-05-2007, 08:49 AM   #2
jphilput
Member
 
Registered: Nov 2007
Posts: 58

Rep: Reputation: 15
Are you sure you want to do this with sudo? I've solved similar problems by using the group permissions.

I generally create a new group with all of the required users as members. I then give the new group write permissions to the files or directories as needed.
 
Old 12-05-2007, 09:33 AM   #3
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by jphilput View Post
Are you sure you want to do this with sudo? I've solved similar problems by using the group permissions.

I generally create a new group with all of the required users as members. I then give the new group write permissions to the files or directories as needed.
You are absolutly right! thank you. the only thing is that the user is still not abble to change the permissions on a file. It could be in some cases a problem.
 
Old 12-05-2007, 03:17 PM   #4
jphilput
Member
 
Registered: Nov 2007
Posts: 58

Rep: Reputation: 15
If you trust the user enough, you could let them change file permissions as the apache user. I use a line similar to the one below to solve a similar issue.

user ALL=(apache) /bin/chmod
 
  


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
Sudo or user permissions? mohrct Linux - Newbie 5 10-10-2007 03:40 PM
sudo permissions problem cuto19 Ubuntu 8 11-30-2005 11:50 PM
Permissions in Debian - sudo works, su doesn't (etch/64Studio) greennick Linux - Software 0 09-12-2005 03:04 PM
sudo and permissions limit mfeoli Linux - General 2 05-05-2005 06:51 PM
ipod/ipod shuffle woes (lack of permissions to edit files) Lechium Linux - Software 1 04-13-2005 03:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:22 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