LinuxQuestions.org
Review your favorite Linux distribution.
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 05-31-2010, 02:59 AM   #1
fishjohn
LQ Newbie
 
Registered: Feb 2010
Posts: 29

Rep: Reputation: 15
non-root user(s) access to modify and restart apache


How could I give regular user(s) access to change httpd(apache) conf and restart apache? I dont want to give them root access.

Acctually giving access to change files is easy, I rather dont know whats the best and clearest way to give access to restart apache?
 
Old 05-31-2010, 03:08 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

On a file level you could use setfacl to give permission to a specific user to edit the file.
On the program level you can use sudo (if installed, if not install it) to provide a secure way to allow another user to restart apache. No need to give root access for neither of the things you want.

Kind regards,

Eric
 
Old 06-01-2010, 10:36 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
You might create a script - e.g. /usr/local/bin/bounce-apache.sh - and make the necessary users sudoers to run only that command (and nothing else).

bounce-apache.sh could simply:

1. Check syntax:
Code:
apachectl -t
2. If the syntactical test went OK, gracefully restart Apache:
Code:
apachectl -k graceful
(Just one idea.)
 
  


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
[SOLVED] [SAMBA] How to track windows user access , create files /modify files on linux SMB efciem Linux - Server 2 05-16-2010 08:45 AM
[SOLVED] How to allow access to some commands having root privleges to be run bu non root user suryashikha Linux - Newbie 8 10-31-2009 01:05 PM
how to make it possible for a non root user to restart the webserver lexthoonen Linux - Server 3 12-16-2008 07:28 PM
Have to su root to restart apache mmfcecil Linux - Security 1 10-09-2007 05:06 AM
modify file access & modify timestamps i2itstud Linux - General 1 05-20-2003 03:34 AM

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

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

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