I'm setting up a SLES 12 system for running web applications on it. There is already a /srv/www
folder and it's owned by root
. So I'm going to reassign it to another user.
Is there a good practice / standard in Suse Linux Enterprise Server, what user should own the web root (and it's files and sub-folders recursively)? In Ubuntu e.g. this user is www-data
. Is it applicable to SLES? Or should the Apache user wwwrun
be the owner of the web root? Or maybe another special user?
Who's the owner of the folder doesn't really matter as long as it's not the same user as the http server is running under, which is probably wwwrun on SUSE (better double check that). Because otherwise all your folders and file would be writable by Apache and that would be a big security hole. What matters is that all the files and folders are not writable by other users, because that would be the same as the already mentioned situation.