Add root_perms extended mke2fs option.
This options allows user to specify custom root dir permissions at FS creation time. If no perms are specified then the root dir permissions would be set to default.
This is related to https://github.com/tytso/e2fsprogs/issues/168
@tytso could you review this please?
Hey, thanks for the PR! I'm not that good at C, so this isn't a review, but I did give it a test.
With this PR applied on top of e2fsprogs-1.47.0, I'm getting wrong permissions. The permission bits seem to be mangled.
# dd if=/dev/zero of=big bs=8M count=100
...
# mkfs.ext4 -E root_owner=1000:1000,root_perms=1777 big
...
# mount big /tmp/e/
# stat /tmp/e
...
Access: (0361/d-wxrw---x) Uid: ( 1000/ haarp) Gid: ( 1000/ haarp)
...
Hey, thanks for the PR! I'm not that good at C, so this isn't a review, but I did give it a test.
With this PR applied on top of e2fsprogs-1.47.0, I'm getting wrong permissions. The permission bits seem to be mangled.
# dd if=/dev/zero of=big bs=8M count=100 ... # mkfs.ext4 -E root_owner=1000:1000,root_perms=1777 big ... # mount big /tmp/e/ # stat /tmp/e ... Access: (0361/d-wxrw---x) Uid: ( 1000/ haarp) Gid: ( 1000/ haarp) ...
I've corrected the patch, could u please test again?
Now it's creating the correct permissions. Thanks!