Whamcloud - gitweb
mke2fs: don't set root dir UID/GID automatically
authorAndreas Dilger <adilger@dilger.ca>
Sun, 16 Jun 2013 01:45:37 +0000 (21:45 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 16 Jun 2013 01:51:33 +0000 (21:51 -0400)
commitdc9cc7006a61d0ef82ee4e1dee133998c6040765
treeb649e5cbe2f0a153acecc38e7cc3c5538a7aebee
parent626a2e7468d44ad61aae2c36533e8c90778f93d8
mke2fs: don't set root dir UID/GID automatically

Don't change the root directory's UID/GID automatically just because
mke2fs was run as a non-root user.  This can be confusing for users,
and is not flexible for non-root installation tools that need to
create a filesystem with different ownership from the current user.

Add the "-E root_owner[=uid:gid]" option to mke2fs so that the user
and group can be explicitly specified for the root directory.  If
the "=uid:gid" argument is not specified, the current UID and GID
are extracted from the running process, as was done in the past.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mke2fs.8.in
misc/mke2fs.c
tests/m_root_owner/expect.1 [new file with mode: 0644]
tests/m_root_owner/script [new file with mode: 0644]