Nextcloud uses the www-data user internally. Id is 33. You should be able to "chown 33 dirname" on the nfs server. That may work?
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
I want to try that, but i've got to add: i want to access this folder from my desktop too. i added it the same way in /etc/fstab and it worked instantly
That's what group permissions are for. You can add yourself to the www-data group and chown www-data:www-data path
. Then you and the container should be able to operate on the contents.
Do not forget to log out and log back in after you add yourself to a new group. Your desktop environment is a program, and it won’t know about the update until you spawn a new graphical shell with the updated permissions.
Or just start a new login shell.
You need to allow nextcloud to control the file permissions. You can do this with the no_root_squash option in the /etc config file
I added this! Your solution + chmod 0770 on my folder made it work. Thanks for helping!
Try telling Docker its rw explicitly:
- /mnt/photos:/photos:rw
It should be rw by default but I can't see what else could be happening. What account runs docker? What account runs nextcloud inside the container?
how can i check which accounts are used? I think my normal user account sets up docker, with uid & gid = 1000. I don't think i created an account in the container so probably root.
The official NC docker container uses the "www-data" internally to run the services. This will get important if you ever want to run tasks via "docker compose exec".
When I run: docker exec -it nextcloud bash
I get: root@nextcloud:/var/www/html#
, does this mean it uses www?
From that prompt, type ls -l
. That will show you a listing of the items in the /var/www/html
directory and there will be columns for the user and group that own each file. It will most likely say www-data
.
That won't fix it because its a permission issue at the NFS level