Reputation: 264
I am setting up a machine to run as a server under Ubuntu. Running Apache and php under as Lampp. I set Samba so I can read from my windows environment some of my linux files.
So I have a user called ziggie
who was set up on samba, so he can access the files and read/write them.
On the other hand, Apache's httpd.conf
says that apache's user is nobody, group 'nogroup'
I thought this might be fine, and then I thought that this may be not good if I wanted to monitor what apache did...
As my website also writes some logs, and uploads files, I was thinking that having nobody for apache would be too much, so I thought I need to give it an identity.
My thought was to create a user for apache under a group similar to ziggie
's, (say webAdmins?), and this way I'll be able to have a better control of the permission?
like disallowing access to most of the stuff to others
, but allowing just some of the access to webAdmins
? maybe changing ownership of many files to ziggie
?
Also I am going to run some crontabs, whose name are these running under?
What is a good enough approach? Thanks!
Upvotes: 1
Views: 628
Reputation: 236
Under Ubuntu, apache is normally run as www-data:www-data and its configuration stored in /etc/apache2/apache.conf
I'm guessing from the configuration you have that you've installed from tarballs rather than debian packages?
Changing permissions for the ziggie user is probably not necessary, though you could add it to the www-data group. If ziggie only needs to change content for a website then none of that needs to be owned by www-data.
Upvotes: 1