Linux : Access Mounted Drive from Media Servers

So for the longest time, I had been annoyed, because I could just not get plex media server to access all the songs, or videos on my partitioned hard drive, which I had configured to mount at boot time.

I went deep with it, trying to figure out if there was any way to change the default umask for mounting drives so that I could give any system process the permission to read contents from the drive.

And finally the solution:

Mount your drive at /mnt instead of /media. The instructions on how to mount your drive are here.The only difference will be to use this line in the fstab entry.

 UUID=<previously-copied-uuid> /mnt/<mydiskname> ntfs defaults 0 0 

doing this allowed my drive to be accessed by the plex media server, since the system treated it not as an external removable drive with limited permissions.

Auto Mount Drive/Partition on start up (Ubuntu)

For those of you who want simply a GUI for this, we have the psydm storage manager in the Ubuntu Software Center.

However, I personally don’t like the work it does. It has been erratic for me. So here’s a very simple method to manually auto-mount drives on startup.

Please note, that the drives are mounted as a root user which implies they can’t be unmounted by the normal user. But they are otherwise accessible.

It is better practice to mount drives using UUID. This is because UUID for every disk is unique, and is a pre-existing identification. The other common method, /dev/diskname, is the name given by the operating system.

Make sure your drive is unmounted.

Open Terminal

sudo mkdir /media/<mydiskname>
sudo blkid

Copy the UUID of the disk you want to mount.
open fstab file in  an editor of your choice. I will use vi.

sudo vi /etc/fstab

We see the following columns :
file system : can be specified with UUID or /dev/
mount point : the point the disk should be mounted at. In this case, /media/<mydiskname>
type : Type of file system – ntfs, ext4, ext2, fat
options : you can either go for defaults, or if you want to know more about them, then look here
dump : Usually value 0
pass : Usually value 0 but you can read more here

Add the following entry:

UUID=<previously-copied-uuid> /media/<mydiskname> ntfs defaults 0 0

exit the file.
And then run

 sudo mount -a 

On next reboot, the filesystem would be mounted automatically.