English
Repair Linux Docker Bind Mount Permissions
Before changing permissions, identify the runtime user and mount.
This procedure assumes standard Linux Docker without Rootless Docker or user namespace remapping. Confirm Source is a directory dedicated to Reader, not /, a shared storage root, an entire website directory, or another service's directory.
Example mount:
text
Type= bind Source= /srv/leelaa-reader/data Destination= /data RW= trueInspect numeric ownership and permissions:
bash
sudo ls -ldn /srv/leelaa-reader/data
sudo ls -ln /srv/leelaa-reader/dataRoot ownership appears as 0:0. With directory mode 755, UID 10001 usually cannot create files. Existing logs, tls, frontend-updates, and database files also need compatible permissions.
Stop Reader, back up the directory to a new location outside it, then repair ownership and owner permissions. Replace every path below with your actual path. Use a backup destination that does not already exist. Run commands one at a time and continue only after each succeeds; do not change permissions if the backup fails:
bash
docker stop leelaa-reader
sudo cp -a /srv/leelaa-reader/data /srv/leelaa-reader/data-backup-before-permission-repair
sudo chown -R 10001:10001 /srv/leelaa-reader/data
sudo chmod -R u+rwX /srv/leelaa-reader/data
docker start leelaa-readerchown changes ownership to the runtime user. u+rwX grants owner read/write access and directory traversal without making every ordinary file executable. This changes existing ownership and is intended for Reader's dedicated data directory. Audiobook originals do not need this change.
For separately mounted subdirectories, repeat the procedure for their actual Source. Changing the parent directory does not repair a subdirectory covered by another mount.
After repair, check logs and readiness.
