Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I just finished doing a LAMP install on a CentOS 6 x64 install.

I have had LAMP server before this one, and I would always ssh into the server as root but i'm trying to make a production environment and i would like to make a user that I can log in with that isn't root or has root privileges.

I noticed that in some of my PHP scripts that create files using the fopen() functions that it sets the user and group to apache.

What would i need to do is I wanted to have a user called optik and a group called nerv (just examples). Also when PHP makes new files and or folders how can i get it so that it too uses that same user and groups?

At this point I just have a fresh LAMP install from SoftLayer and nothing else other than MySQL server running on it as well. (no yum updates or anything of the sort yet)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

suphp is what you need if you want to run php scripts as a specific user:

http://www.suphp.org/Home.html

You should try to find a howto for your Centos distribution to set it up correctly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.