Wednesday, March 21, 2012

How to mount a drive as another user

This was a case of one of those issues where you constantly search for an answer to only have it staring you in the face the whole time *facedesk*

if you want to mount a drive as another user or have its group as something else, simply place uid=xxxx and/or gid=xxxx in the mount options.

for example:
     mount -t vfat /dev/sdb1 /mnt/kittens
will mount with root permissions (BOOOOOOO)
     mount -t vfat /dev/sdb1 /mnt/kittens -o uid=1000,gid=1000
will mount as the user that is uid=10000 with group permissions of gid=1000

now my hacked appletv will properly read that mounted drive for all my media crap. sweetities.

No comments:

Post a Comment