LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   sudo permissions to edit apache's files (https://www.linuxquestions.org/questions/linux-newbie-8/sudo-permissions-to-edit-apaches-files-604656/)

xpucto 12-05-2007 07:03 AM

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

jphilput 12-05-2007 08:49 AM

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.

xpucto 12-05-2007 09:33 AM

Quote:

Originally Posted by jphilput (Post 2980987)
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.

jphilput 12-05-2007 03:17 PM

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


All times are GMT -5. The time now is 02:39 PM.