5

How do I get my USB drive to auto-mount as owned by 'me' rather than by whomever is logged in to the computer screen at the time? Often I SSH into my computer while someone else is using it, and so the read-write permissions of devices I mount go to them.

This causes all kinds of permission related problems and there must be a way for USB drives to always mount to a given user.

3
  • sorry, i do not understand what you plan. do you want to swich the user who is logged in when a usb drive mounts?
    – Dominik
    Oct 26, 2011 at 19:35
  • No, just always mount it automatically as a pre-determined user, not the user that just so happens to control the desktop.
    – Mathew
    Oct 26, 2011 at 21:11
  • The USB stick is 'vfat' format. On the shared PC my cat Theodore is logged in and watching something on YouTube. I want to plug my USB stick in, sync my work files and maybe update the USB stick once I have done some more work. I do this on a netbook, ssh'd in to the main, but shared PC. Unfortunately, because user 'theodore' is logged in, the files on the USB stick are 700/500 with owner 'theodore' whereas I would like them to be always user 'mathew' regardless of whom is actually logged in. (My work PC mounts the drive as 'mathew' and I can rsync etc effortlessly).
    – Mathew
    Oct 27, 2011 at 8:51

1 Answer 1

0

Review the following forum post on UDEV rules.
http://ubuntuforums.org/showthread.php?t=168221

The key piece of information for your particular scenario would be the OWNER parameter which is not actually documented in the above post, but you can read about it here:
http://www.reactivated.net/writing_udev_rules.html#ownership

1
  • 2
    If possible at askubuntu we like to provide the information directly in addition to links because links often go bad (and it's more convenient also). Any chance you could mention how to find the device used by the kernel where flash drives are placed; and an example of a udev rule and file location for, maybe /dev/sdb for owner "mathew"? Aug 8, 2012 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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