Internal Error: directory must be writeable (it is!)

I installed kanboard on Manjaro from AUR and configured nginx. Accessing Kanboard in Firefox I get:

Internal Error: The directory "/usr/share/webapps/kanboard/data" must be writeable by your web server user

I made user http (my nginx and php-fpm user) the owner of /usr/share/webapps/kanboard/ and /etc/webapps/kanboard/and everything inside, restarted nginx and php-fpm, but that doesn’t help.

What should I do?

PHP 8.1.6 (fpm-fcgi), nginx 1.20. Linux 5.10. Trying to use it with SQLite.

For anyone getting ‘Internal Error: The directory “/usr/share/webapps/kanboard/data” must be writeable by your web server user’

The problem and a hint for the fix was already reported by cydanil in 2020 but I could not put 2 and 2 together without the error message above in the same post. So i will be as verbose as I would have needed it to be to have helped myself. First php-fpm needs to be installed (which is not a direct dependency in the PKGBUILD). php5-fpm which is referenced by e.g. the nginx-conf is no longer in the current repositories. therefore the nginx-conf (that you copy into the /etc/nginx/sites-available folder) needs to have the factcgi_pass path to the socket adjusted. for me it was:

fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;

With that out of the way:

php-fpm.service defines ProtectSystem=full which prevents subfolders of /usr from being written to. as it happens kanboards data-directory is in /usr/share/webapp/kanboard/data as evidenced by the error message at the beginning of my post. Instead of lowering the protection overall you can add exemptions to this.

$sudo systemctl edit php-fpm.service

and add the following 2 lines in between the comments:
[Service]

ReadWritePaths=/usr/share/webapps/kanboard/data

Thats was it for me.

^ from the arch forums

1 Like

Thanks for sharing this.

The data folder contains the sqlite database and the task attachments. That’s one of the reasons why.

Cheers, Fx