After a kernel upgrade Docker containers get 'permission denied' writing to bind-mounted volumes (overlay2/overlayfs change)
Environment
Ubuntu 22.04 LTS host upgraded from kernel 5.15.x to 6.1.x, Docker Engine 23.0 using overlay2 storage driver, containers run as rootless user namespaces in some environments, host filesystem is ext4, volumes are host bind mounts under /srv/appdata.
Symptoms
Existing containers that previously wrote to bind-mounted directories now fail with EACCES / permission denied when trying to create files or change ownership in those mounts. Container processes run and respond to liveness probes, but application logs show repeated permission errors and I/O failures. No changes to application code or container images were made at the same time.
Observations
Changing permissions on the host to 777 on the target directory did not resolve writes from inside the container. Running an interactive shell inside the container and attempting 'touch /srv/appdata/test' returns permission denied; strace shows open( ... , O_CREAT) failing with EACCES. dmesg shows kernel messages referencing overlayfs and 'permission denied' or 'revalidate failed' entries. AppArmor audit logs show no denials. Running the container with --privileged makes the write succeed. Reverting to the previous kernel (booting old kernel) restores write functionality.
Already attempted
Restarted Docker daemon, recreated containers, recreated bind mount directories, verified host permissions and ownership, tested writing from a new scratch container, reboots between kernel versions, tried changing storage driver to vfs for one test (container recreated manually) and observed write success with vfs. Did not alter SELinux or AppArmor profiles on the host.
Question
What kernel or Docker interactions can cause overlay2-mounted containers to see permission denied on host bind mounts after a kernel update, and what safe diagnostics and remediation steps should I take so I can restore write access without risking data loss?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags
- Linux35% match
Docker containers see config file permission change after editor 'atomic save' — bind-mounted file temporarily unreadable until container restart
Open0 answers - Software25% match
Self-hosted GitHub Actions runners produce incomplete multi-stage Docker images after kernel update (overlay2: missing build artifacts)
Open0 answers - Virtualization23% match
Docker containers lose DNS resolution after laptop resume on Ubuntu 22.04 due to systemd-resolved stub resolver change
Open0 answers