Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I'm trying to hide a partition form a specific group of users in Ubuntu 12.04.

I have created a new rule in /etc/udev/rules.d/99-hide-disk.rules with


And this works for all users.

I tried KERNEL="sda3",ENV{UDISKS_PRESENTATION_HIDE}="1",GROUP="adm",MODE:="0700 but the partition is still hidden. That changes the group and permissions on the device rather than the rule.

How do I make the rule only apply to a particular group of users?

share|improve this question
As far as I understand udev, it does not care whether or not a certain user is logged in. I'm afraid there is no simple solution for your problem. Of course I might be wrong and hope someone else comes up with a bright idea. – soulsource Oct 29 '12 at 16:52
Thanks for the reply, I presumed that udev couldn't do it but maybe there is a way of loading the rules file based on the users group who logs into nautilus? I don't know, would this be a bash script job? – Nulty Oct 29 '12 at 17:52
To be honest, I've no clue if that can be done, because the udevadm man page states: "Reloading rules does not apply any changes to already existing devices." – soulsource Oct 31 '12 at 8:13

If you wan't to hide all files inside a specific folder remove the execute permissions on that folder for the user or group you want. That disallows them from entering the folder.

chmod g-x /path/to/folder

The g stands for 'group'. And '-x' means 'remove execute permissions'.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.