diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bindfs.1 | 2 | ||||
-rw-r--r-- | src/bindfs.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/bindfs.1 b/src/bindfs.1 index 8a92246..b45b79d 100644 --- a/src/bindfs.1 +++ b/src/bindfs.1 @@ -63,6 +63,8 @@ right of a slash in the list of mappings. Currently, the options \fB--user\fP, \fB--group\fP, \fB--mirror\fP and \fB--create-for-*\fP override the corresponding behavior of this option. +Requires mounting as root. + .SH FILE CREATION POLICY New files and directories are created so they are owned by the mounter. diff --git a/src/bindfs.c b/src/bindfs.c index 24d4f53..897ae01 100644 --- a/src/bindfs.c +++ b/src/bindfs.c @@ -1429,6 +1429,10 @@ int main(int argc, char *argv[]) /* Parse usermap */ if (od.map) { + if (getuid() != 0) { + fprintf(stderr, "Error: You need to be root to use --map !\n", od.group); + return 1; + } if (!parse_user_map(settings.usermap, settings.usermap_reverse, od.map)) { /* parse_user_map printed an error */ return 1; |