tytso / e2fsprogs

Ext2/3/4 file system utilities
http://ext4.wiki.kernel.org
373 stars 219 forks source link

Allow setting root dir permissions directly in mke2fs #168

Closed haarp closed 4 months ago

haarp commented 9 months ago

Hello,

currently there is a way of setting the owner of the root directory in mke2fs (-E root_owner), but not the permissions. To do this, the fs needs to be mounted first, followed by chmod, followed by unmount. This is not always convenient, e.g. when scripts are used to create a fs. My particular use case involves running ext4 on zram devices.

This has been asked a couple of times on Stack Exchange too: 1, 2

Would it be possible to add a root_perms extended option aswell?

Thanks a lot!

chestnykh commented 9 months ago

Hi! I've created PR that adds root_perms option. Can someone review it?

haarp commented 4 months ago

Thanks both of you!