Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I allow normal users to mount a tmpfs under any subdirectory owned by them?

share|improve this question
up vote 0 down vote accepted

You would probably have to write a wrapper script that you would allow them to execute with sudo.

share|improve this answer

I'm thinking about giving them partial sudo rights to mount and umount.

First add user nisse to the group users

addgroup nisse users

Then allow the group users to execute mount and umount, add this in /etc/sudoers

%users  ALL=(ALL) /bin/mount
%users  ALL=(ALL) /bin/umount

Then the user should be allowed to mount a tmpfs drive.

And if you follow Jayen answer with a wrapper scipt, then add something like this to sudoers

%users  ALL=(ALL) /usr/local/bin/

If that wrapper script is called /usr/local/bin/

/Good luck

share|improve this answer
Obviously, giving access to mount without restrictions is a huge security risk and almost equivalent to giving them root access. – Joachim Breitner Sep 11 '14 at 13:21

Another option is to make a wrapper binary that is suid root (but that is more effort.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .