Joplin server docker error. EACCES: permission denied, mkdir '/mnt/fast_pool

Operating system

Linux

Joplin version

3.3.3

Sync target

File system

What issue do you have?

If I use the docker compose file provided in Docker Hub, I can get the server up and running without any issue. When trying to use the storage driver, I am getting the error "Error: Could not write content to storage: EACCES: permission denied, mkdir '/mnt/fast_pool" and as a result I am unable to access the admin page. I am using TrueNAS scale as my docker host.but I am not using the app function or app catalog provided in TrueNAS. I have installed Portainer and am doing this as a Portainer stack. My log file from the Joplin container is attached below. I am attempting to use a data set on TrueNAS as the directory for the storage driver. I have created a user and a group in TrueNAS named "joplin" and gave them the PUID of 1001 and the GUID of 1001. I have also tried all sorts of permutations for data set permissions: root owning, my TrueNAS admin ID owning, users owning, etc.

Here is my compose file. I am not proxying this container/stack and if I remove the line "- STORAGE_DRIVER=Type=Filesystem; Path=/mnt/fast_pool/Joplin/storage" then everything works fine.
Also, for what its worth, it seems like I am getting the 3.3.3-BETA container from docker hub when I specify "latest"

services:
db:
image: postgres:16
volumes:
- /mnt/fast_pool/Joplin/postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=testing123
- POSTGRES_USER=joplin
- POSTGRES_DB=joplindb
app:
image: joplin/server:latest
depends_on:
- db
ports:
- "22300:22300"
restart: unless-stopped
environment:
- APP_PORT=22300
- APP_BASE_URL=http://192.168.50.3:22300
- STORAGE_DRIVER=Type=Filesystem; Path=/mnt/fast_pool/Joplin/storage
- DB_CLIENT=pg
- POSTGRES_PASSWORD=testing123
- POSTGRES_DATABASE=joplindb
- POSTGRES_USER=joplin
- POSTGRES_PORT=5432
- POSTGRES_HOST=db

Log file

joplin_log.txt (5.77 KB)

Bump...anyone have any ideas?

Long shot but, are you running Docker as a snap? And if so, could you try run sudo snap connect docker:removable-media - which gives the Docker snap read/write access to /media and /mnt

(For context, I've no idea what these NAS environments usually use, so, this might be dumb in practise but I've kept it here anyway incase)

Thanks for answering. However, I am not using SNAP. It is essentially just Debian with docker installed.

So the answer to this is that the directory used for the storage driver has to have the same permissions that Postgres requires, which is to say 999:999. I am not sure I saw that anywhere in the documentation

1 Like