Skip to content

Volume permissions of empty volumes not persisted #27720

@3nprob

Description

@3nprob

Issue Description

Ownership and permissions changes of empty container volumes are not persisted between container restarts.

They are persisted in docker.
They are persisted for non-empty volumes.

Steps to reproduce the issue

$ podman run --rm -it -v myvol:/vol alpine:latest chown 1000:1000 /vol
$ podman run --rm -it -v myvol:/vol alpine:latest ls -la /vol
total 8
drwxr-xr-x    2 root     root          4096 Dec  8 00:00 .
dr-xr-xr-x    1 root     root          4096 Dec  8 00:00 ..
$ podman run --rm -it -v myvol:/vol alpine:latest sh -c 'touch /vol/testfile && chown 1000:1000 /vol'
$ podman run --rm -it -v myvol:/vol alpine:latest ls -la /vol
total 8
drwxr-xr-x    2 1000     1000          4096 Dec  8 00:00 .
dr-xr-xr-x    1 root     root          4096 Dec  8 00:00 ..
-rw-r--r--    1 root     root             0 Dec  8 00:00 testfile
$ docker run --rm -it -v myvol:/vol alpine:latest chown 1000:1000 /vol
$ docker run --rm -it -v myvol:/vol alpine:latest ls -la /vol
total 8
drwxr-xr-x    2 1000     1000          4096 Dec  8 00:00 .
dr-xr-xr-x    1 root     root          4096 Dec  8 00:00 ..

Describe the results you received

Ownership not persisted

Describe the results you expected

Ownership persisted

podman info output

host:
  arch: amd64
  buildahVersion: 1.41.4
  cgroupControllers:
  - cpu
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
store:
  configFile: /home/user/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
version:
  APIVersion: 5.6.1
  Built: 1757054398
  BuiltTime: Fri Sep  5 02:39:58 2025
  GitCommit: 1e2b2315150b2ffa0971596fb5da8cd83f3ce0e1
  GoVersion: go1.24.6
  Os: linux
  OsArch: linux/amd64
  Version: 5.6.1

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

No

Additional environment details

No response

Additional information

Similar issue: #10776

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugweekkind/bugCategorizes issue or PR as related to a bug.triagedIssue has been triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions