`chown: changing ownership of '/var/lib/mysql/...': Operation not permitted` at container start.
IntermediateTroubleshootingStorage, volumes and disk space
Answer
Likely causes → Bind mount on NFS with root_squash, a Windows/macOS file share, or rootless user namespaces where chown to a mapped UID is not allowed.
Diagnose → mount | grep <path>; docker exec c id.
Fix → Use a named volume, fix export options (no_root_squash or proper UID), or map user: to the owner.
Prevent → Avoid databases on network/shared filesystems.
More on Storage, volumes and disk space
`no space left on device` while pulling an image or starting a container.Beginner`df` shows free space but Docker says no space: inodes at 100%.Advanced`/var/lib/docker/containers/<id>/<id>-json.log` is 50 GB.Beginner`docker system prune` did not free much although `docker system df` shows large "Reclaimable".IntermediateVolume data disappeared after `docker compose down -v` or `docker volume prune`.IntermediateData is not persisted: after container recreate the database is empty.Intermediate