https://github.com/exaexa/chownmap
chown whole UID/GID ranges, e.g. for LXC unprivileged containers
https://github.com/exaexa/chownmap
Last synced: 3 months ago
JSON representation
chown whole UID/GID ranges, e.g. for LXC unprivileged containers
- Host: GitHub
- URL: https://github.com/exaexa/chownmap
- Owner: exaexa
- Created: 2016-07-03T18:43:46.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-10-18T12:11:45.000Z (over 8 years ago)
- Last Synced: 2025-06-29T09:04:25.822Z (12 months ago)
- Language: Roff
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chownmap
Shell tool to map file owners accordingly to userns ranges. Handy e.g. for
easily creating/renumbering unprivileged LXC containers and similar stuff.
## Usage
```
chownmap [ files ] ...
```
- `from` -- start of the original UID/GID range
- `to` -- start of the new UID/GID range
- `length` -- length of the range
Example:
```
chownmap 0 100000 65536 /var/lib/lxc/thecontainer/rootfs
```
will move all user/group IDs of `thecontainer` from "privileged" (root is 0) to
"unprivileged" (root is 100000).
`find`, `stat`, and `chown` are run internally for actual work. If you have
something special to tell to `chown` (`-v`, `--preserve-root` or so), use
environment variable `CHOWN_EXTRA_OPTS`.
## License
Oh please.