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] root user in the container does not have permissions to any files or folders #18

Closed
1 task done
ZeroOmar opened this issue Jun 29, 2024 · 2 comments
Closed
1 task done

Comments

@ZeroOmar
Copy link

ZeroOmar commented Jun 29, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I had this container running periodic backup and kept UpToDate with watchtower on the latest tag

but I noticed backup failing with permission denined.
after investigation I noticed that the root user in the container does not have permissions to any files or folders.
not just mounted folders that permissions can be messed up but to the container root directory.

I tested releases and found that this happened after the recent update from 1.4.5-r0-ls109 to 1.4.5-r0-ls110

root@5a1c40d0ea8c:/# ls -l
ls: cannot access 'bin': Operation not permitted
ls: cannot access 'command': Operation not permitted
ls: cannot access 'dev': Operation not permitted
ls: cannot access 'etc': Operation not permitted
ls: cannot access 'home': Operation not permitted
ls: cannot access 'init': Operation not permitted
ls: cannot access 'lib': Operation not permitted
ls: cannot access 'media': Operation not permitted
ls: cannot access 'mnt': Operation not permitted
ls: cannot access 'opt': Operation not permitted
ls: cannot access 'package': Operation not permitted
ls: cannot access 'proc': Operation not permitted
ls: cannot access 'root': Operation not permitted
ls: cannot access 'run': Operation not permitted
ls: cannot access 'sbin': Operation not permitted
ls: cannot access 'srv': Operation not permitted
ls: cannot access 'sys': Operation not permitted
ls: cannot access 'tmp': Operation not permitted
ls: cannot access 'usr': Operation not permitted
ls: cannot access 'var': Operation not permitted
ls: cannot access 'docker-mods': Operation not permitted
ls: cannot access 'app': Operation not permitted
ls: cannot access 'config': Operation not permitted
ls: cannot access 'defaults': Operation not permitted
ls: cannot access 'lsiopy': Operation not permitted
ls: cannot access 'build_version': Operation not permitted
ls: cannot access 'boot': Operation not permitted
ls: cannot access 'data': Operation not permitted
total 0
d????????? ? ? ? ?            ? app
d????????? ? ? ? ?            ? bin
d????????? ? ? ? ?            ? boot
-????????? ? ? ? ?            ? build_version
d????????? ? ? ? ?            ? command
d????????? ? ? ? ?            ? config
d????????? ? ? ? ?            ? data
d????????? ? ? ? ?            ? defaults
d????????? ? ? ? ?            ? dev
-????????? ? ? ? ?            ? docker-mods
d????????? ? ? ? ?            ? etc
d????????? ? ? ? ?            ? home
-????????? ? ? ? ?            ? init
d????????? ? ? ? ?            ? lib
d????????? ? ? ? ?            ? lsiopy
d????????? ? ? ? ?            ? media
d????????? ? ? ? ?            ? mnt
d????????? ? ? ? ?            ? opt
d????????? ? ? ? ?            ? package
d????????? ? ? ? ?            ? proc
d????????? ? ? ? ?            ? root
d????????? ? ? ? ?            ? run
d????????? ? ? ? ?            ? sbin
d????????? ? ? ? ?            ? srv
d????????? ? ? ? ?            ? sys
d????????? ? ? ? ?            ? tmp
d????????? ? ? ? ?            ? usr
d????????? ? ? ? ?            ? var

This could be due to the rebase to alpine 3.20

Expected Behavior

on image tag 1.4.5-r0-ls109 and older

root can see files as expected

root@393f0d264e60:/# ls -l
total 32
drwxr-xr-x   1 abc  abc      0 May 14 15:27 app
drwxr-xr-x   1 root root   930 May 14 15:27 bin
drwxrwxrwx   9 root root  4096 Jan  1  1970 boot
drwxr-xr-x   1 root root  5224 May 14 15:27 command
drwxrwxrwx   1 abc  abc     18 Jun 29 14:22 config
drwxr-xr-x   1 root root     0 Jun 29 14:53 data
drwxr-xr-x   1 abc  abc     16 May 16 07:37 defaults
drwxr-xr-x   5 root root   340 Jun 29 14:53 dev
-rwxr--r--   1 root root 23629 Jan  1  1970 docker-mods
drwxr-xr-x   1 root root   986 Jun 29 14:53 etc
drwxr-xr-x   1 root root     0 May 14 15:27 home
-rwxr-xr-x   1 root root  1012 Nov 20  2023 init
drwxr-xr-x   1 root root   866 May 16 07:40 lib
drwxr-xr-x   1 root root     0 May 14 15:27 lsiopy
drwxr-xr-x   1 root root    28 May 14 15:27 media
drwxr-xr-x   1 root root     8 Jun 29 14:53 mnt
drwxr-xr-x   1 root root     0 May 14 15:27 opt
drwxr-xr-x   1 root root    30 May 14 15:27 package
dr-xr-xr-x 317 root root     0 Jun 29 14:53 proc
drwx------   1 root root    32 Jun 29 14:53 root
drwxr-xr-x   1 root root   178 Jun 29 14:53 run
drwxr-xr-x   1 root root   992 May 14 15:27 sbin
drwxr-xr-x   1 root root     0 May 14 15:27 srv
dr-xr-xr-x  13 root root     0 Jun 29 14:53 sys
drwxrwxrwt   1 root root     0 May 14 15:27 tmp
drwxr-xr-x   1 root root    54 May 14 15:27 usr
drwxr-xr-x   1 root root    86 May 14 15:27 var

Steps To Reproduce

  1. installing the container with docker using the bellow docker command
  2. exec into the container
  3. run ls -l /

Environment

- OS: unraid 6.6.4
- How docker service was installed: build into the OS 
- Docker version: 18.06.1-ce

CPU architecture

x86-64

Docker creation

docker run -d --name='rsnapshot' --net='bridge' -e HOST_OS="Unraid" -e 'PUID'='99' -e 'PGID'='100' -e 'TZ'='Africa/Cairo' -v '/mnt/user/appdata/rsnapshot/config/':'/config':'rw' -v '/mnt/user/':'/mnt/user/':'rw' -v '/mnt/user/appdata/rsnapshot/root/.ssh/':'/root/.ssh/':'rw' -v '/boot/':'/boot/':'ro' 'linuxserver/rsnapshot:1.4.5-r0-ls110'

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝

Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID: 99
User GID: 100
───────────────────────────────────────
Linuxserver.io version: 1.4.5-r0-ls112

Build-date: 2024-06-27T04:42:22+00:00
───────────────────────────────────────

***** Upgrading config file if required *****
/etc/rsnapshot.conf file is already up to date.
***** Validating config file *****

K
[custom-init] No custom files found, skipping...
[ls.io-init] done.
Copy link

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

@LinuxServer-CI
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@LinuxServer-CI LinuxServer-CI closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants