The Basics
- Nextcloud Server version (e.g., 29.x.x):
- 31.0.4
- Operating system and version (e.g., Ubuntu 24.04):
- Truenas Scale 25.04.0
- Is this the first time youâve seen this error? (Yes / No):
- Yes
- When did this problem seem to first start?
- yesterday when I wrecked my permission while creating another dataset
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
- ?
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
- No
Summary of the issue you are facing:
I installed NextCloud 3 days ago after a tutorial on youtube, I set www-data as owner for the datasets I created. Except some problems I was working on resolving (!cron not started since, image preview logged some errors, etc.), everything worked pretty fine.
Yesterday I added a few datasets and wasnât careful enough, and all permissions changed from POSIX to NFS4. Afterwards Nextcloud container wasnât starting anymore.
I changed the permissions back to POSIX and added users/groups: www-data, netdata and docker. Still Nextcloud isnât starting.
My Truenas Dataset setup looks like this:
- apps(ssd)
- applications
- nextcloud
- userdata
- appdata
- postgresdata
- otherapp
- otherapp
- nextcloud
- applications
- mainpool(hdds)
Log entries
app_livecycle.log says:
âŚ
Container ix-nextcloud-postgres-1 Waiting
Container ix-nextcloud-redis-1 Waiting
Container ix-nextcloud-permissions-1 Exited
Container ix-nextcloud-postgres-1 Error
Container ix-nextcloud-redis-1 Healthy
dependency failed to start: container ix-nextcloud-postgres-1 is unhealthy
sudo docker logs ix-nextcloud-postgres-1 says:
2025-05-15 17:59:14.282 UTC [1] FATAL: data directory â/var/lib/postgresql/dataâ has wrong ownership
2025-05-15 17:59:14.282 UTC [1] HINT: The server must be started by the user that owns the data directory.
chmod: changing permissions of â/var/lib/postgresql/dataâ: Operation not permitted
I already tried to âsudo chown -cR www-data:www-data /var/lib/postgresql/dataâ myself in the truenas bash⌠but that directory does not exist. So I guess its somewhere docker internal⌠But I dont know how to get there.
Thanks in advance for your help, I hope provided information is sufficient.