Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to set up linux permissions for contractor?

Posted on 2010-11-17
3
Medium Priority
?
375 Views
Last Modified: 2012-05-10
I am setting up a webserver for a contractor to use.  i want to give them permissions to log in, upload files to the website, restart apache if needed, and set up the postrgres db.  what is the best practice for doing this?  i want to give them enough permissions to get the job done, but not too many permissions they dont need.
0
Comment
Question by:trip008vk
3 Comments
 
LVL 5

Expert Comment

by:dacasey
ID: 34157643
Create an account for him.  Add him to the apache group, postgres and other groups as necessary.

adduser consultant

vi \etc\group   <- add the newly created user to al groups you think he will need.
0
 
LVL 7

Accepted Solution

by:
Hatrix76 earned 1000 total points
ID: 34162785
NEVER EVER touch /etc/passwd or /etc/group directly!

You should never do that, but use the tools the system provides you with.

usermod -a -G <group> <user>


to add a user to groups

for sudo, use visudo, etc.


So, having this out of the way, your answer depends deeply on which distribution of linux you will use, in centos i would do:

He should be able to watch the logfiles of httpd, as they are world-readable

allow him to restart apache with sudo (use visudo) add:
<username> ALL=/etc/init.d/httpd start, /etc/init.d/httpd stop,/etc/init.d/httpd restart, /sbin/services httpd restart

then add him to the group you use for the website (like apache) and make sure the upload directory for the webpage has group read-write-execute permissions on them.

Then, create him an postgresql user account which is allowed to create databases and you should be good to go. With this account he should be able to administrate his databases.
0
 

Author Closing Comment

by:trip008vk
ID: 34168257
Thank you, Hatrix76.  this is along the lines of what i had been thinking.  dacasey's "solution" wasn't helpful at all
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Loops Section Overview
Suggested Courses
Course of the Month6 days, 21 hours left to enroll

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question