Reputation: 125
Even if you have all permissions for mount source/destination it requires root, why?
Upvotes: 8
Views: 4356
Reputation: 50563
Alternatively, you can use bindfs
to do the same thing as with mount --bind
but with the added bonus that bindfs
won't require you root privileges, because it is a FUSE filesystem.
Upvotes: 7
Reputation: 754
That's simply because the underlying system call (see 'man 2 mount') requires CAP_SYS_ADMIN capability no matter what the mount options are.
Allowing a user to perform mount calls would probably be rather tricky regarding security.
If you want to allow certain mount operations you can use a tool like sudo by writing appropriate rules for it.
Upvotes: 4