Web Server User: Which one is it and how do I use it?

So basically I’m on Opensuse 12.3 64-bit with the latest apache, mysql and phpmyadmin. This system is mainly for testing network monitoring and performance software. Some examples of the software I’ve tried to install are: Icinga, Owncloud (not network monitoring obviously), zabbix and Nconf. Now if I remember right, Nconf is the only one that uses mysql. I was able to reset the mysql root user and make a database, but I noticed that none of these applications would work from the package from the package manager. I had to download the zip/tars of them and put them in the htdocs folder manually. I also had to change the write permissions on the folders to 777 in order for them to run correctly.

So the question is:

I know that 777 is not safe for web and network for that matter. How do I make these folders work correctly with lower permissions?

Pure guess but maybe you need to add yourself to a group that has the proper permissions rather then change the permissions

On openSUSE apache normally runs as user “wwwrun”, group “www”.

We’ve added the www group to the logged in user.

This had no effect.

Maybe the better question is what user and group should we use to install web apps.

And to combine both above posts, I would create a separate user for managing web pages, etc. This to make a very clear and save boundary between your daily work (banking, whatever) and you web managing. And of course make www it’s group. And make all web pages, etc. in /srv owned by that user and group.

Well, the standard web directory is /srv/www/htdocs/ which is owned by root:root.
So you would have to make sure that your user can access that.

Or use the user home directory ~/public_html, which you can access with the URL “http://localhost/~username”.

And as I said, apache runs as wwwrun:www, so that user has to have access to the webfile.
But that’s mostly a problem for write permissions.

Jonnothin wrote:
> So basically I’m on Opensuse 12.3 64-bit with the latest apache, mysql
> and phpmyadmin. This system is mainly for testing network monitoring and
> performance software. Some examples of the software I’ve tried to
> install are: Icinga, Owncloud (not network monitoring obviously), zabbix
> and Nconf. Now if I remember right, Nconf is the only one that uses
> mysql. I was able to reset the mysql root user and make a database, but
> I noticed that none of these applications would work from the package
> from the package manager.

What do you mean by “the package manager”?

Do you mean YaST, zypper, or something else?

And what repository did these packages come from?

> I had to download the zip/tars of them and put
> them in the htdocs folder manually. I also had to change the write
> permissions on the folders to 777 in order for them to run correctly.
>
> So the question is:
>
> I know that 777 is not safe for web and network for that matter. How do
> I make these folders work correctly with lower permissions?

Depending on the answers to the questions above, it may be better to
concentrate on making the packages work instead.