themetman's picture

I have been using Backdrop for some years now. I have just installed Kbuntu 26.04LTS on  my PC and Laptop. A move from Gentoo which I have used for years. I have a site on my PC and a few on the Laptop. The sites are in $HOME/FG-Docs/public_html on both, they have always been like that. Both sites run from a "web" folder inside the Root Folder with a .htaccess file to redirect to the web folder.

On the Laptop, the error in the Status Page is this:

The directory files is not writable. The directory ../private is not writable. You may need to set the correct directory at the file system settings page or change the current directory's permissions so that it is writable.

On the Laptop, the Media File System Paths Page is this:

  • The directory files is not allowed to be an upload destination.
    The directory ../private is not allowed to be an upload destination.
    The directory /tmp is not allowed to be an upload destination.

I have cleared the caches using Bee. No problems reported, I have run the update.php file, no problems reported.

I have an identical setup on the PC and Laptop. Apache, Mariadb and php using php-fpm

I always set the Apache and php-fpm user:group to francis:www-data.

The Apache and php8.5-fpm services are running.

I have a script I have used for many years to set the permissions on my Backdrop sites:

#!/usr/bin/bash
# MUST be run as root if changing ownership of files 
# 
echo "Setting Permissions and Ownership on this Site" 
chown -R francis:www-data . 
echo "Setting all directories to 755" 
find . -type d -exec chmod u=rwx,g=rx,o=rx '{}' \+ 
echo "Setting all files to 644" 
find . -type f -exec chmod u=rw,g=r,o=r '{}' \+ 
echo "Special Permissions on config, private and files" 
chmod 775 web/modules 
chmod 775 web/files 
find web/files -type d -exec chmod ug=rwx,o=rx '{}' \+ 
find web/files -type f -exec chmod ug=rw,o=r '{}' \+ 
find config -type d -exec chmod ug=rwx,o=rx '{}' \+ 
find config -type f -exec chmod ug=rw,o=r '{}' \+ 
chmod 770 private 
echo "Setting settings.php file to 440" 
chmod 440 web/settings.php 
echo "Setting all .htaccess files 444" 
find . -type f -name .htaccess -exec chmod u=r,g=r,o=r '{}' \+ 
echo "Setting FixPermissions to 750" 
chmod 750 FixPermissions 

If I try and put the site into Maintenance Mode  I get this error:

Failed to write configuration file: ../config/active/system.core.json

However the site is put into Maintenance Mode, and similarly when I take it out of Maintenance Mode it complains, but it is taken out of Maintenance Mode.

I have had a good look at this post and elsewhere.

The permissions on $HOME/FG-Docs/public_html on the PC (working) are :

drwxrwxr-x 1 francis www-data         456 Sep 15  2025  public_html

Inside that folder the permissions for the site are this:

drwxrwxr-x 1 francis www-data   98 May 31  2024 config
drwxrwxr-x 1 francis www-data   38 May 31  2024 logs 
drwxrwx--- 1 francis www-data   18 Mar  4  2023 private 
drwxr-xr-x 1 francis www-data  222 May 17 11:46 web

On the Laptop (Not working) $HOME/FG-Docs/public_html are this:

drwxrwxr-x 1 francis www-data      698 Sep 18  2025 public_html

Inside that folder the permissions for the site are this:

drwxrwxr-x 1 francis www-data   98 Jun  1  2024 config
drwxr-xr-x 1 francis www-data   38 May  9 08:50 logs 
drwxrwx--- 1 francis www-data   46 Apr  5  2021 private 
drwxr-xr-x 1 francis www-data  224 May 20 08:50 web

I am really foxed by this one. Any help to diagnose the problem would be much appreciated.
 

Comments

Is this an SELinux issue where you have to also make sure the SELinux permissions are set correctly?

themetman's picture

Nope, SELinux is not installed. I am running Ubuntu with the KDE Plasma Desktop.

Aparmour is enabled by default on both machines

I have enabled another site on the Laptop and am having the same problem.