First: I am now using the stable branch again and am pretty sure that all “testing” elements are gone, as the last two system upgrades had more than 700 files to be upgraded.
I had an issue with the local web server earlier, where I learnt that using the home folder wasn’t allowed any more by default. I changed the hardening.conf file in order to continue as I was used to do. After the last upgrade, I noticed that this didn’t work properly any longer. The changes to files in my local (home) folder were reflected in the web server, but another app which I had installed (docuwiki) couldn’t write cache and other data to the folders any longer. I realised that now in etc/httpd/httpd.conf all folders were changed to /srv/http/webspace instead of /home/mine/webspace. I checked the filesystem and found that the /home/mine/webspace was symlinked to /srv/http/webspace. Now, docuwiki wants to write into srv/webspace/…, but can’t. It has no rights to do so.
How can this be solved? I was thinking of changing the owner of /srv/http/, which is root, but don’t really want to do that, as it is very likely owned by root for a reason. Another option is to change the owner of /srv/http/webspace, which is myself (as it is symlinked only), but if I give the ownership to http, I can’t write into that folder any longer, except maybe if I am a member of the group http…
Maybe I’m not thinking straight.
What would be the best/right way?
I don’t know how this situation came into being, I am pretty sure that I didn’t do the symlinking.
I’m wondering too of whether doing the configuration under /etc/httpd/conf/ won’t be overwritten with the next update Anyway I would put this directory under version control then
# cd /etc/httpd/conf/
# git init
# git add --all
# git commit -a -m "initial commit"
The user and group is http
I have already given write access to the group http, of which all mentioned users are already members.
Still I have some wrting issues particularly to cache folders.
This should be easily solved, as suggested yourself, by changing permissions of the “webspace” directory:
For security reasons /srv/http should remain owned by root.
However, your preferred hierarchy below that (I’d typically create something like /srv/http/project/www) can be owned by you for convenience, considering it’s intended for for local development.
Sorry for the late reply. I fought with it, I set the rights and it didn’t work. There were still some files inaccessible. Hence I once again tried changing the document root to where it was before the change, and this time it worked. Now I can again work on my stuff without problems.
Thanks for all your suggestions and help!
Just to inform about these questions: The user and the group “http” exist, and http is member of the group http. However, I am not, but I thought I was.
And I found out that I am the user of the httpd process, not http.
This may be the reason for it not working properly, but I can live with the solution I have posted already. Thank you for looking into this and for giving such detailed advice!
This can be easily changed fixed. There are good reasons services like web servers run as their own service user. Even if it’s for development, you may as well set it up properly.
Most dev environments try to emulate production.
If you expose this publicly, then there’s an extra layer of security in place.