Pages: 1
I am currently experiencing some permissions issues that I am unable to resolve after much reading of related posts and various attempts.
I am able to successfully install Piwigo in Docker (host computer is on macOS 26 with Docker and a number of other container running successfully) and create my first album and then upload photos to that album. At this point everything works as expected and there are no problems. As soon as I restart the host computer I get this error message:
Piwigo encountered an irrecoverable error
•/_data/templates_c no write access
#1 mkgetdir /var/www/html/piwigo/include/template.class.php(102)
#2 Template::_construct/var/www/html/piwigo/include/common.inc.php(294)
#3 include_once /var/www/html/piwigo/index.php(11)
I assumed it was a permissions issue of some sort and read the post by RushLana about setting UID and GID in the env file. Leaving the UID/GID blank or using 1000 for both I get the above error after a restart.
Checking the UID/GID for the user account on my host computer shows UID to be 502 and GID to be 20. If I put these values in the env file then I get this error as soon as I try to start Piwigo
Fatal error: Uncaught RuntimeException: The file could not be written to. Check that appropriate permissions have been set. in /var/www/html/piwigo/include/Logger.class.php:134 Stack trace: #0 /var/www/html/piwigo/include/Logger.class.php(306): Logger->open()#1/var/www/html/piwigo/include/Logger.class.php(295): Logger->write()#2/var/www/html/piwigo/include/Logger.class.php(202): Logger->og() #3 /var/www/html/piwigo/include/functions_user.inc.php(420): Logger->infoO#4/var/www/html/piwigo/include/functions_user.inc.php(302): getuserdata(#5 /var/www/html/piwigo/include/user.inc.php(137): build_user( #6
/var/www/html/piwigo/include/common.inc.php(204): include('...) #7/var/www/html/piwigo/index.php(11): include_once(...') #8 {main} thrown in /var/www/html/piwigo/include/Logger.class.php on line
Environment details are:
• Piwigo 16.3.0 * Check for upgrade
• Installed on 18 April 2026, 11 minutes ago
• Operating system: Linux
• Container info: Official 16.3.0c
• PHP: 8.4.18 (Show info) [2026-04-18 15:09:01]
• MySQL: 11.8.6-MariaDB-ubu2404 [2026-04-18 15:09:01]
• Graphics Library: External ImageMagick 7.1.2-17
• Cache size N/A never calculated C Refresh
Piwigo URL: http://photos.bkc.ca
At this point I am unsure exactly where the error is. I previously had Piwigo installed on the same computer using a compose.yaml from linuxserver.io and it worked quite well for months. I am unable to figure out why the Piwigo official compose.yaml is causing these issues. My next step is to try the linuxserver.io yaml again
Any suggestions?
Offline
Hi,
Can you check the logs using docker logs ?
I'm looking for the line : "Non-bind-mount environment falling back to chmod o+rwx (expected on macOS and Windows, you can safely ignore setfacls warnings)"
Also how did you migrate from LinuxServer to the official container ? did you follow the migration guide ?
https://github.com/Piwigo/piwigo-docker … inuxServer
I don't have a Mac so I can't reproduce your bug easily.
Offline
Thank for the reply. Later today I will recreate the container with the Piwigo yaml and env file, restart and capture the Docker logs both before and after a restart.
To answer your question when I changed from linuxserver.io yaml to Piwigo yaml I completely deleted the entire container and started a new container with the Piwigo yaml and then reloaded the photos. To be very honest I am no longer 100% sure if my old yaml file came from linuxserver.io. I started with their yaml but tried a few others as I was evaluating everything. Since posting my question a day ago I deleted the Piwigo container and created a new container with my old yaml file from several months ago - this container does survives a restart unlike the Piwigo yaml
It will not take me long to recreate a Piwigo container, upload some photos and get you the information you have requested
Offline
occurred to me if you are checking mount points and permissions I decided to find out how to check folder permission inside a container. Ran the Inspect command and container ID. I have pasted in the 'Mounts' section for each container (not sure if this is any help or not)
Piwigo container
"Mounts": [
{
"Type": "bind",
"Source": "/Users/brian/piwigo/piwigo-data/piwigo",
"Destination": "/var/www/html/piwigo",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/Users/brian/piwigo/piwigo-data/scripts",
"Destination": "/usr/local/bin/scripts",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
}
piwigo-db container
"Mounts": [
{
"Type": "bind",
"Source": "/Users/brian/piwigo/piwigo-data/mysql",
"Destination": "/var/lib/mysql",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
}
Offline
Hi,
The mounts aren't an useful info for this specific problem but can send me the logs from the main containers ?
Also if that's possible the output of ls -aln ./piwigo-data/piwigo ?
Last edited by RushLana (2026-04-22 12:40:53)
Offline
Hello,
I think I have what you have asked for...
If I go to the Docker Logs for the main Piwigo container I see this:
2026-04-21 19:43:24.591 | s6-rc: info: service s6rc-oneshot-runner: starting
2026-04-21 19:43:24.593 | s6-rc: info: service s6rc-oneshot-runner successfully started
2026-04-21 19:43:24.593 | s6-rc: info: service fix-attrs: starting
2026-04-21 19:43:24.593 | s6-rc: info: service init-script: starting
2026-04-21 19:43:24.595 | s6-rc: info: service fix-attrs successfully started
2026-04-21 19:43:24.595 | s6-rc: info: service legacy-cont-init: starting
2026-04-21 19:43:24.597 | [timezone] set to 'America/Denver'
2026-04-21 19:43:24.597 | s6-rc: info: service legacy-cont-init successfully started
2026-04-21 19:43:24.641 | Current piwigo version 16.3.0
2026-04-21 19:43:24.641 | setfacl: /var/www/html/piwigo: Not supported
2026-04-21 19:43:24.641 | Non-bind-mount environment falling back to chmod o+rwx (expected on macOS and Windows, you can safely ignore setfacls warnings)
2026-04-21 19:43:24.906 | No user script found; you can optionally add one in ./piwigo-data/scripts/user.sh
2026-04-21 19:43:24.906 | See documentation : https://github.com/Piwigo/piwigo-docker … ed-options
2026-04-21 19:43:24.906 | s6-rc: info: service init-script successfully started
2026-04-21 19:43:24.906 | s6-rc: info: service postfix: starting
2026-04-21 19:43:24.906 | s6-rc: info: service php-fpm: starting
2026-04-21 19:43:24.907 | s6-rc: info: service nginx: starting
2026-04-21 19:43:24.908 | s6-rc: info: service postfix successfully started
2026-04-21 19:43:24.908 | s6-rc: info: service php-fpm successfully started
2026-04-21 19:43:24.909 | s6-rc: info: service nginx successfully started
2026-04-21 19:43:24.909 | s6-rc: info: service legacy-services: starting
2026-04-21 19:43:24.913 | s6-rc: info: service legacy-services successfully started
2026-04-21 19:43:24.986 | postfix/postlog: starting the Postfix mail system
2026-04-21 19:43:35.141 | 192.168.65.1 - - [21/Apr/2026:19:43:35 -0600] "GET / HTTP/1.1" 500 813 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Safari/605.1.15"
2026-04-22 01:56:00.238 | 2026/04/22 01:56:00 [error] 95#95: *3 open() "/var/www/html/piwigo/robots.txt" failed (2: No such file or directory), client: 172.67.157.58, server: localhost, request: "GET /robots.txt HTTP/1.1", host: "photos.bkc.ca"
2026-04-22 01:56:00.238 | 172.67.157.58 - - [22/Apr/2026:01:56:00 -0600] "GET /robots.txt HTTP/1.1" 404 153 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; PerplexityBot/1.0; +https://perplexity.ai/perplexitybot)"
2026-04-22 01:56:00.738 | 172.67.157.58 - - [22/Apr/2026:01:56:00 -0600] "GET / HTTP/1.1" 500 813 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; PerplexityBot/1.0; +https://perplexity.ai/perplexitybot)"
2026-04-22 08:37:17.310 | 2026/04/22 08:37:17 [error] 94#94: *7 open() "/var/www/html/piwigo/favicon.ico" failed (2: No such file or directory), client: 172.67.157.58, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "photos.bkc.ca"
2026-04-22 08:37:17.311 | 172.67.157.58 - - [22/Apr/2026:08:37:17 -0600] "GET /favicon.ico HTTP/1.1" 404 153 "-" "NetworkingExtension/8624.2.4.10.1 Network/5812.120.38 iOS/26.5"
2026-04-22 08:37:17.311 | 2026/04/22 08:37:17 [error] 99#99: *9 open() "/var/www/html/piwigo/apple-touch-icon-precomposed.png" failed (2: No such file or directory), client: 172.67.157.58, server: localhost, request: "GET /apple-touch-icon-precomposed.png HTTP/1.1", host: "photos.bkc.ca"
2026-04-22 08:37:17.311 | 2026/04/22 08:37:17 [error] 94#94: *8 open() "/var/www/html/piwigo/apple-touch-icon.png" failed (2: No such file or directory), client: 172.67.157.58, server: localhost, request: "GET /apple-touch-icon.png HTTP/1.1", host: "photos.bkc.ca"
2026-04-22 08:37:17.311 | 172.67.157.58 - - [22/Apr/2026:08:37:17 -0600] "GET /apple-touch-icon.png HTTP/1.1" 404 153 "-" "NetworkingExtension/8624.2.4.10.1 Network/5812.120.38 iOS/26.5"
2026-04-22 08:37:17.311 | 172.67.157.58 - - [22/Apr/2026:08:37:17 -0600] "GET /apple-touch-icon-precomposed.png HTTP/1.1" 404 153 "-" "NetworkingExtension/8624.2.4.10.1 Network/5812.120.38 iOS/26.5"
2026-04-22 08:37:17.311 | 172.67.157.58 - - [22/Apr/2026:08:37:17 -0600] "GET / HTTP/1.1" 500 813 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.4 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.4 facebookexternalhit/1.1 Facebot Twitterbot/1.0"
2026-04-22 10:21:14.659 | 192.168.65.1 - - [22/Apr/2026:10:21:14 -0600] "GET / HTTP/1.1" 500 813 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Safari/605.1.15"
2026-04-22 10:21:14.852 | 2026/04/22 10:21:14 [error] 98#98: *10 open() "/var/www/html/piwigo/apple-touch-icon-precomposed.png" failed (2: No such file or directory), client: 192.168.65.1, server: localhost, request: "GET /apple-touch-icon-precomposed.png HTTP/1.1", host: "photos.bkc.ca"
2026-04-22 10:21:14.852 | 192.168.65.1 - - [22/Apr/2026:10:21:14 -0600] "GET /apple-touch-icon-precomposed.png HTTP/1.1" 404 153 "-" "com.apple.WebKit.Networking/21624.2.4.11.1 Network/5812.120.38 macOS/26.5"
2026-04-22 10:21:14.854 | 2026/04/22 10:21:14 [error] 98#98: *10 open() "/var/www/html/piwigo/favicon.ico" failed (2: No such file or directory), client: 192.168.65.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "photos.bkc.ca"
2026-04-22 10:21:14.854 | 192.168.65.1 - - [22/Apr/2026:10:21:14 -0600] "GET /favicon.ico HTTP/1.1" 404 153 "-" "com.apple.WebKit.Networking/21624.2.4.11.1 Network/5812.120.38 macOS/26.5"
2026-04-22 10:21:14.855 | 2026/04/22 10:21:14 [error] 100#100: *12 open() "/var/www/html/piwigo/apple-touch-icon.png" failed (2: No such file or directory), client: 192.168.65.1, server: localhost, request: "GET /apple-touch-icon.png HTTP/1.1", host: "photos.bkc.ca"
2026-04-22 10:21:14.855 | 192.168.65.1 - - [22/Apr/2026:10:21:14 -0600] "GET /apple-touch-icon.png HTTP/1.1" 404 153 "-" "com.apple.WebKit.Networking/21624.2.4.11.1 Network/5812.120.38 macOS/26.5"
2026-04-22 10:21:30.666 | 192.168.65.1 - - [22/Apr/2026:10:21:30 -0600] "GET / HTTP/1.1" 500 813 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Safari/605.1.15"
2026-04-22 10:21:32.407 | 192.168.65.1 - - [22/Apr/2026:10:21:32 -0600] "GET / HTTP/1.1" 500 813 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Safari/605.1.15"
and if I change to the Piwigo directory on my server and run the terminal command 'ls -aln ./piwigo-data/piwigo' I get this:
Last login: Tue Apr 21 21:14:28 on ttys000
brian@M4Server ~ % cd piwigo
brian@M4Server piwigo % ls -aln ./piwigo-data/piwigo
total 680
drwxrwxrwx@ 8 502 20 256 Apr 21 19:22 _data
drwxr-xrwx@ 44 502 20 1408 Mar 27 03:45 .
drwxr-xr-x@ 5 502 20 160 Apr 21 19:19 ..
-rw-r--r--@ 1 502 20 276 Mar 27 03:45 .gitignore
-rw-r--r--@ 1 502 20 1823 Mar 27 03:45 about.php
-rw-r--r--@ 1 502 20 5990 Mar 27 03:45 action.php
drwxr-xr-x@ 66 502 20 2112 Mar 27 03:45 admin
-rw-r--r--@ 1 502 20 13298 Mar 27 03:45 admin.php
-rw-r--r--@ 1 502 20 15817 Mar 27 03:45 comments.php
-rw-r--r--@ 1 502 20 468 Mar 27 03:45 COPYING.txt
drwxr-xr-x@ 7 502 20 224 Mar 27 03:45 doc
drwxr-xr-x@ 6 502 20 192 Mar 27 03:45 docs
-rw-r--r--@ 1 502 20 5548 Mar 27 03:45 feed.php
drwxr-xr-x@ 3 502 20 96 Mar 27 03:45 galleries
-rw-r--r--@ 1 502 20 17647 Mar 27 03:45 i.php
-rw-r--r--@ 1 502 20 5547 Mar 27 03:45 identification.php
drwxr-xr-x@ 69 502 20 2208 Mar 27 03:45 include
-rw-r--r--@ 1 502 20 13342 Mar 27 03:45 index.php
drwxr-xr-x@ 33 502 20 1056 Mar 27 03:45 install
-rw-r--r--@ 1 502 20 15970 Mar 27 03:45 install.php
drwxr-xr-x@ 75 502 20 2400 Mar 27 03:45 language
-rw-r--r--@ 1 502 20 18092 Mar 27 03:45 LICENSE.txt
drwxrwxrwx@ 6 502 20 192 Mar 27 03:45 local
-rw-r--r--@ 1 502 20 2776 Mar 27 03:45 nbm.php
-rw-r--r--@ 1 502 20 3346 Mar 27 03:45 notification.php
-rw-r--r--@ 1 502 20 15104 Mar 27 03:45 password.php
-rw-r--r--@ 1 502 20 28430 Mar 27 03:45 picture.php
drwxrwxrwx@ 7 502 20 224 Mar 27 03:45 plugins
-rw-r--r--@ 1 502 20 2112 Mar 27 03:45 popuphelp.php
-rw-r--r--@ 1 502 20 13761 Mar 27 03:45 profile.php
-rw-r--r--@ 1 502 20 947 Mar 27 03:45 qsearch.php
-rw-r--r--@ 1 502 20 2013 Mar 27 03:45 random.php
-rw-r--r--@ 1 502 20 1937 Mar 27 03:45 README.md
-rw-r--r--@ 1 502 20 4558 Mar 27 03:45 register.php
-rw-r--r--@ 1 502 20 5000 Mar 27 03:45 search.php
-rw-r--r--@ 1 502 20 1728 Mar 27 03:45 SECURITY.md
-rw-r--r--@ 1 502 20 4860 Mar 27 03:45 tags.php
drwxr-xr-x@ 5 502 20 160 Mar 27 03:45 template-extension
drwxrwxrwx@ 8 502 20 256 Mar 27 03:45 themes
drwxr-xr-x@ 19 502 20 608 Mar 27 03:45 tools
-rw-r--r--@ 1 502 20 3159 Mar 27 03:45 upgrade_feed.php
-rw-r--r--@ 1 502 20 16618 Mar 27 03:45 upgrade.php
drwxrwxrwx@ 4 502 20 128 Apr 21 19:21 upload
-rw-r--r--@ 1 502 20 63189 Mar 27 03:45 ws.php
brian@M4Server piwigo %
Offline
Thanks a lot for the logs, this will help reproduce the issue a lot faster.
While I work on it I can give you a quick fix, that should work until you restart your container.
You can run
docker exec -it <ContainerName> chown -R nginx:nginx /var/www/html/piwigo
Which will force all file within the piwigo-data/piwigo directory to be owned by the container nginx user.
It will prevent you from pasting files in the galleries directory without admin privilege.
I will keep you updated as I work to solve this.
Offline
Perhaps I don’t understand but I see the the reference to nginx in your last message - I do not use nginx but rather a Cloudflare tunnel to access Piwigo from outside my network (unless internally Piwigo uses nginx for some function) ??
Offline
Hi,
The official piwigo container uses nginx internally, docker exec will run this command inside it.
Offline
Hello,
Just checking in see if there has been any progress in finding a fix for this issue?
Thanks…
Offline
Pages: 1