Usecase:
I have a lot of production data and copying it for dev purposes would be unreal. I was thinking that OverlayFS could be a solution until a problem with permissions arised.
Let's assume i have following folder structure:
/data/prod
- production data (files+subfolders) owned byprod:prod
having664
/data/prod-overlay/dev1/{overlay,upper,lower}
- data for developers (userdev1:dev1
in this case)
Dev users can read prod data but not modify.
My question is:
Is it possible to make files in /data/overlayfs/developer1/overlay
writable even when permissions of original files do not allow it? Or is there any other (simple) way to achieve such behaviour while keeping prod data read-only for dev users?
For example:
There is a file /data/prod/subfolder/file
(prod:prod
, 664
) and user dev1
wants to remove or change /data/prod-overlay/dev1/overlay/subfolder/file
.
Note: dev1
can remove file /data/prod-overlay/dev1/overlay/file
(with rm -f
) probably because he is the owner of the overlay folder.