Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] permission error on NFS volume #377

Closed
1 task done
the-packet-fang opened this issue Nov 3, 2023 · 3 comments
Closed
1 task done

[BUG] permission error on NFS volume #377

the-packet-fang opened this issue Nov 3, 2023 · 3 comments

Comments

@the-packet-fang
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

While trying to migrate the nc config and data from a local bind to an NFS docker volume, I keep getting the below permission errors.
When connected to the container I can see that all config files are attached to /config.
I added root ALL=(target_user) NOPASSWD: /bin/mkdir to the sudoer, and tried sudo -u abc -c mkdir fromcont and I could see the folder created on the server side.

Expected Behavior

the container should pick the config files and work just like the last state were it was left

Steps To Reproduce

  1. upload the conf folder to NFS_server://container_volumes/nc/conf
  2. upload the data folder to NFS_server://container_volumes/nc/data
  3. chown both folders to 997
  4. create two volume for each folder
  5. create the container and attach the volumes

Environment

- OS: ubuntu 22
- How docker service was installed: following the official document

CPU architecture

x86-64

Docker creation

docker volume create --driver local \
--opt type=nfs \
--opt o=addr=192.168.100.3,nfsvers=4,async \
--opt device=:/container_volumes/nc/conf \
nc-conf-volume

docker volume create --driver local \
--opt type=nfs \
--opt o=addr=192.168.100.3,nfsvers=4,async \
--opt device=:/container_volumes/nc/data \
nc-data-volume

docker run -d \
  --name=nextcloud \
  -e PUID=997 \
  -e PGID=997 \
  -e TZ=Africa/Casablanca \
  --network Harbor-net \
  --ip 192.168.100.20 \
  -v nc-conf-volume:/config \
  -v nc-data-volume:/data \
  --restart unless-stopped \
  lscr.io/linuxserver/nextcloud:latest

Container logs

2023-11-03T01:37:50.951785172Z 
2023-11-03T01:37:50.951794932Z       ██╗     ███████╗██╗ ██████╗ 
2023-11-03T01:37:50.951801928Z       ██║     ██╔════╝██║██╔═══██╗
2023-11-03T01:37:50.951808517Z       ██║     ███████╗██║██║   ██║
2023-11-03T01:37:50.951814852Z       ██║     ╚════██║██║██║   ██║
2023-11-03T01:37:50.951821127Z       ███████╗███████║██║╚██████╔╝
2023-11-03T01:37:50.951827443Z       ╚══════╝╚══════╝╚═╝ ╚═════╝ 
2023-11-03T01:37:50.951833924Z 
2023-11-03T01:37:50.951840138Z    Brought to you by linuxserver.io
2023-11-03T01:37:50.951846295Z ───────────────────────────────────────
2023-11-03T01:37:50.952137136Z 
2023-11-03T01:37:50.952148861Z To support LSIO projects visit:
2023-11-03T01:37:50.952155696Z https://www.linuxserver.io/donate/
2023-11-03T01:37:50.952162084Z 
2023-11-03T01:37:50.952168264Z ───────────────────────────────────────
2023-11-03T01:37:50.952175139Z GID/UID
2023-11-03T01:37:50.952195652Z ───────────────────────────────────────
2023-11-03T01:37:50.954334293Z 
2023-11-03T01:37:50.954347898Z User UID:    997
2023-11-03T01:37:50.954355271Z User GID:    997
2023-11-03T01:37:50.954374181Z ───────────────────────────────────────
2023-11-03T01:37:50.954381726Z 
2023-11-03T01:37:50.977057130Z find: /config/nginx/nginx.conf.sample: Permission denied
2023-11-03T01:37:50.977445719Z find: /config/nginx/site-confs/default.conf.sample: Permission denied
2023-11-03T01:37:50.977694373Z find: /config/nginx/ssl.conf.sample: Permission denied
2023-11-03T01:37:50.979432837Z cp: cannot create regular file '/config/nginx/nginx.conf.sample': Permission denied
2023-11-03T01:37:50.979678577Z cp: cannot create regular file '/config/nginx/ssl.conf.sample': Permission denied
2023-11-03T01:37:50.981270586Z cp: cannot create regular file '/config/nginx/site-confs/default.conf.sample': Permission denied
2023-11-03T01:37:50.981632174Z s6-rc: warning: unable to start service init-samples: command exited 1
Copy link

github-actions bot commented Nov 3, 2023

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@aptalca
Copy link
Member

aptalca commented Nov 3, 2023

https://docs.linuxserver.io/misc/support-policy/#unsupported

@the-packet-fang
Copy link
Author

thanks for the reference

@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants