I have an Ubuntu 14.04 based Media Center and I store the media files on a USB HDD. I add files to drive directly on a Mac so I have it formatted as FAT32.
The problem is that after reconnecting the drive to the Ubuntu, it mounts at /media/user/drivename
and only the root user is allowed access. I need several applications to have full access to this drive. I can change file permissions in the terminal but it doesn't change because of the /media/user
location. I am able to manually sudo mount /dev/sdc1 /media/drivename
& sudo chmod 777 /media/drivename
but the mount point changes each time.
Is there a way to make this drive always mount where root and other applications have access?
Best Answer
Since you have the UUID, you can edit
/etc/fstab
and add an entry like so:Replace
<UID>
and<GID>
with the output ofid -u
andid -g
respectively.Explanation:
/dev/sdXY
as an identifier.vfat
is the mount type for FAT32 systemsnofail
option should prevent mount from complaining, or your boot from being held up, if the disk is not present.uid=<UID>,gid=<GID>
options set the ownership of all files and folders in the mounted disk, since FAT32 doesn't have a Unix-like permission/ownership structure. This doesn't affect the files themselves, only the mounted representation. Ditto for theumask
.