I have my movies and TV Shows on an external SSD which is pretty much always connected to my laptop and auto-mounts on login.
But to run my Plex media server I am supposed to change the file permissions so that it can read the files on the external SSD.
chmod 775 /run/media/hydra
And then use the systemctl command to start the server.
systemctl start plexmediaserver.service
What script can I use to make this happen automatically on startup?(I tried putting this in a .sh file and made it autostart but it didnt seem to work)
why would you do that ? the chmod is done only once.
if you have to start a service each time after reboot you simply missed to enable the service.
you enable it with
sudo systemctl enable plexmediaserver.service
now the service is started automatically each time at boot
Plex shows an error dialog saying âCheck for the file at stored locationâ and upon checking the file directory through plex, it doesnât show my files on the external SSD because it doesnât have Read permission, which is why I tried chmod on startup and that worked.
Well, if it works, then good for you, but I foresee problems with permissions arising soon, because NTFS does not store POSIX file ownership or permissions.
So better would be to include a record for that filesystem â with the proper permissions as a mount option â in /etc/fstab. Something along the lines ofâŚ
reboot and test. if it works remind that it is a dirty-workaround.
the main problem is the ntfsâŚ
the setup as @Aragorn recommends below is the better way but might need some work.
I dont mind changing the filesystem, as ive to clean the SSD anyway. Should I? But I noticed it also doesnt see the manjaro partition in the same directory.
sda 8:0 0 465.8G 0 disk
ââsda1 8:1 0 100M 0 part
ââsda2 8:2 0 16M 0 part
ââsda3 8:3 0 1.9G 0 part /run/media/hydra/0a001be9-83af-4bbe-9c23-a4bca902cf61
ââsda4 8:4 0 285.7G 0 part /run/media/hydra/Storage
ââsda5 8:5 0 509M 0 part
ââsda6 8:6 0 167.5G 0 part /run/media/hydra/Manjaro22
ââsda7 8:7 0 10G 0 part
Actually, no â /mnt is intended as a temporary mountpoint.
Considering that itâs a filesystem intended as a media server, I would create a mountpoint for it under /srv. On my system here, I use /srv/mmedia for all my multimedia stuff. That way, all user accounts have (read-only) access to it â root has write access, of course.
Time to promote another one of my tutorialsâŚ
Itâs udisks2, a plug & play subsystem of systemd.
Thatâs news to me. All my partitions are mounted in /mnt/<subdiectory>. Unless you mean directly, in which case yeah, and Iâm sorry for the misunderstanding.
No, even then still, if you mount something to /mnt directly â which is what /mnt is intended for â then itâll hide all your other mounts under there, because the subdirectories will no longer be visible.
I intend to use the external ssd to store files from windows as well(I have dual booted). Partition manager says ext4 is linux only. Should i consider any other format like ExFAT?
Create two partitions: one in ext4 and another one in exfat â there are fewer problems with exfat than with ntfs, and GNU/Linux can read and write to exfat.
That way, you can mount the multimedia stuff on the ext4 partition to /srv/mmedia â after creating the mountpoint, of course â and you can mount the exfat partition under your $HOME somewhere.