0

when I plug in my usb hdd, ubuntu 13.04 will mount it to /media/myname/label, but the umask is 700, I try to change it by "chmod 755 xxxxx", but no effect.

So, how to change default umask?

BTW: my usb hdd is stored some movies, I want to use plex media server to scan them, but pms cannot find anything from hdd path, so I think it is a umask issue.

2 Answers2

0

This answer from UbuntuForums is sort of right:

You'll need to create an fstab entry that uses auto mount, I haven't done this in a long time but you could try adding the following to /etc/fstab:

/dev/sdx /path/to/mnt ntfs-3g auto,users,uid=1000,gid=100,dmask=022,fmask=133 0 0

Then umount and try plugging it back in to see if that works. If you just want the same permissions for file/directory you could replace f/dmask with umask.

The sort of wrong part is that it uses disk indices instead of UUIDs or disklabels. The point does, however, remain the same.

RobotHumans
  • 29,190
  • 4
  • 76
  • 114
0

You can actually do the same entry with disk UUID.

Simply change the above thing into

UUID="" /path/to/mnt ntfs-3g auto,users,uid=1000,gid=100,dmask=022,fmask=133 0 0

sudo blkid will show you the UUID of the desired disk. PS- pay attention to the double quotes.

Sam
  • 181
  • 1
  • 2
  • 9