Permissions configuration for web server


 
Thread Tools Search this Thread
Operating Systems Solaris Permissions configuration for web server
# 1  
Old 08-31-2012
Permissions configuration for web server

Greetings!

I have a Solaris workstation that I use for web hosting. It runs SAMP and everything was working good for me until I got a need to add a couple of co-workers to help me with development. I'm trying to find some guidance for how to set up filesystem permissions so everybody would be able to upload their PHP scripts to the workstation without permission issues. By no means I'm a system administrator, just using my limited skillset to get things done Smilie

So here is my current setup, I don't really know if it's correct, but I'm in secure environment and it gets things done:

- All web pages are in /www directory (documentRoot).
- Apache runs under webservd user, no shell configured for that user.
- /www belongs to my UNIX login, so I can upload scripts to /www.
- subdirectories in /www that are used for uploads through web page (when user sends file to the server) belong to webservd. And that's cool since they have no PHP scripts in them.

Now the project is growing and I need to add a couple of guys who should be able to upload their PHP scripts to /www.

Here is the couple of ways I figured so far:

1) I give them my password - (not cool, like I did not try to figure right thing out)
2) I create a new UNIX user (upload) and change /www owner to that - (again, the password has to be shared, so it's just a little better)
3) Find a right way to do it (that's pretty much why I'm writing this post Smilie)

Any ideas/help to point me in a right direction are greatly appreciated!

Thank You,
PN.
# 2  
Old 08-31-2012
That's the sort of thing groups are for. Users belonging to the group the folder belongs to will be able to create, edit, and delete files inside it as long as you chmod g+rwx foldername. Files they create will belong to themselves.

Either add them to the group the folder belongs to, or create a new group for them, add them to it, and chown the folder to it. New group might be preferable if you want to avoid the webserver being able to write to the folder!

Do not brute-force it with chmod 777, that's a security nightmare.

Other things you might consider doing to the shared folder are making it group-sticky(so that new files will belong to the group), and sticky, like /tmp/ is, so users can only delete files which belong to them. You can control the permissions their files are created with via their umask.
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 09-02-2012
First of all, if I were you all Apache docs will be in /var/apache/public_html , of course you need set up Apache and PHP to read content from location I mentioned.

As a second thing, as Corona688 said, UNIX user can have one primary group and up to 15 secondary groups where he or she can belong, so give those guys permissions to read and write in apache directory, usually I gave as a second group apache so if he or she will put something on web server he can do it without my root password.
This User Gave Thanks to solaris_user For This Post:
# 4  
Old 09-03-2012
Thank you very much, guys!
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Web Server/Permissions issues.

I do not know if this is the correct place to post this, and I have tried to trawl through relevant articles to fix the issue, but I am stumped. I have a server, log as root. var/www is root:root var/www/website-one is root:root var/www/website-one/neosmart-stream is root:root This... (10 Replies)
Discussion started by: LightCastle
10 Replies

2. OS X (Apple)

TextMate web server permissions

this could be a dumb question. i am still becoming used to usr / group permissions. permissions to place a file into XAMPP/htdocs. the problem is that when i go to place a TextMate file into XAMPP/htdocs a window comes up and states: Type your password to allow TextMate to make changes. ... (2 Replies)
Discussion started by: cowLips
2 Replies

3. UNIX for Advanced & Expert Users

Web server configuration in Unix

Dear All, i'm very new to this forum, infact just joined today. :o . i want to install and configure web server on Unix (Sco Openserver 5.0.7). i want any documents or text guide on this..... awaiting for experts help, Thanx Nikhil (1 Reply)
Discussion started by: niksharma
1 Replies

4. UNIX for Dummies Questions & Answers

Web Server - uploading Frontpage web - will there be problems??

hiya All, New to this Web site stuff. Will be installing Fedora's latest O/S (including Apache) - onto a spare PC Then... Gulp... setting up a Web server. Designing a Web site using WINDOWS FRONT PAGE 2002: * Simply easiest/quickiest way to knock up a basic site. * There won't be... (6 Replies)
Discussion started by: marty 600
6 Replies

5. UNIX for Dummies Questions & Answers

Dynamic web pages for Unix Web Server

Hi, my company is considering a new development of our web site, which used to run on Apachi over Solaris. The company who is going to do this for us knows only about developing it in ASP. I guess this means we'll have to have another ISS server on NT for these dynamic pages :( What are... (5 Replies)
Discussion started by: me2unix
5 Replies
Login or Register to Ask a Question