3 ms·
Recently ran into this. So far I've landed on `setfacl` - `--user` didn't work for me because there were root permissions in my image - I didn't dig into why
by epage 5y ago
Recently ran into this. So far I've landed on `setfacl`
- `--user` didn't work for me because there were root permissions in my image
- I didn't dig into why `userns-remap` didn't work
- I didn't give https://github.com/boxboat/fixuid https://github.com/boxboat/fixuid a try yet
Some notes from my experience
setfacl -dm "u:alexandros:rw" ~/alpine
should be
setfacl -R -dm "u:alexandros:rwx" ~/alpine
In case:
- `-R`: There is existing content in `~/alpine` you want made avalable
- `x`: You want your container to be able to create directories
However, you can still run into problems if
- Your container copies data from outside your bind-mount to inside. It sort-of worked except somehow the mask was `r--`, making things lose writeable.
- Your container moves data from outside your bind-mount to inside. This fully preserves the permissions.
I ended up creating a `.keep` file in the bind mount and doing a `cp --attributes-only --preserve=mode,ownership,xattr .keep <target>`