Apache local web server problem with writing writes for a web app

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 can only forward to Apache HTTP Server - ArchWiki

I’m wondering too of whether doing the configuration under /etc/httpd/conf/ won’t be overwritten with the next update :thinking: 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"

What user is your webserver running under? Probably smartest to add yourself, Root, and the Apache user to a group and grant that group write access.

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.

Nothing in /etc should get overwritten with updates, unless you push a pacnew file through with: (O)verwrite.


This is all really hard to comprehend.

Can you post your config file(s) in code blocks? Many of us know Apache. (I just haven’t run it in Manjaro.)

As you are making everything tied to the user http.

Does the user exist?

id http

The group?

id -gn http

Is it part of that group?

groups http

Is httpd running as the user http? (Also configured in the Apache config.)

ps aux | grep httpd

The first field shows the owner of the process.

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.

Using the hierarchy you mentioned, simply:

sudo chown -R $USER:$USER /srv/http/webspace

Then access it via the symbolic link, as before.

Regards.