Hi all. So I have set up Plex on a couple of Raspberry Pi’s for some people but with this recent install, I am having a hell of a time with a particular folder. I have followed typical guides on PiMyLlifeUp have always had success, but I am stuck today.
I have permanently mounted the external hard drive using a process outlined here:
I have used this method a couple of times and never have had an issue.
I have two folders in question. One for TV Shows and one for Movies. They are both sub folders within a USB hard drive’s root folder. There is no difference between these folders other than the content. When I create a TV Show library and add the TV Shows folder, the content adds fine. I should make a mention that when I am adding this folder to my Plex library, I can see all of the sub folders. Every TV show that I have in there is contained within their own named folders and Plex sees them.
When I attempt to create the Movies library and choose the Movies folder, not only do I not see any sub folders but there is also no content in Plex after I do so. It’s as if it cannot read anything in this folder. But, when I mounted and set permissions, I set them for the entire hard drive folder system from the top down.
As a side note, if I were to add the root folder of the external hard drive to any library type, it finds EVERYTHING. This is only happening when I am adding the Movies folder. This is very frustrating.
You can fully open up permissions by running the following commands as root:
find /starting_dir -type d -exec chmod 777 {} ;
find /starting_dir -type f -exec chmod 644 {} ;
That ‘should’ allow plex to read everything but not necessarily manage it (because the ownership may be different and we did not assign write permissions to ‘group’ or ‘other’)
If you want plex to be able to manage your library (i.e. recordings, file deletions, etc.), as root:
find /starting_dir -exec chown plex:plex {} ;
Note: The curly braces and backslash-semicolon are required. They are positional place holders and end of line markers, respectively.
Personally, in keeping with my paranoid nature, I keep my ‘main’ libraries under different ownership and do not set the group or other write permissions.
Thank you for the response.
I am making an assumption that ‘/starting_dir’ is the name of the folder that I want to open up permissions with? In my case, I used ‘/mnt’ because that is the name of my folder where my Plex data is in.
When I run the first command, I get this error message (with all of the text so you can see my entry):
pi@raspberrypi:~ $ sudo sh
# find /mnt -type d -exec chmod 777 {};
find: missing argument to `-exec'
I thought your ‘hogwild’ comment was related to the ‘find’ command.
So, I ran the ‘find’ command and still get the same error.
pi@raspberrypi:~ $ sudo sh
# find /mnt -type d -exec chmod 777 {}\;
find: missing argument to `-exec'
Also, if you want me to unmount the drive and make sure the 755 permissions are there, I will need instructions on how to do it. I know how to unmount and mount the drive but the rest, I am unsure of.
I just copied and pasted exactly what you put up there…LOL. There was no space in there.
I used your instructions in the link in my first post (I will re-link it at the end of this response). I just happened to name my drive /mnt where you had named yours /usb/c.
The command seems to have worked now. Here’s a sample of one of that lines of code that printed.
chmod: changing permissions of '/mnt/usb1/TV Shows/Looney Tunes Golden Collection/Looney Tunes Season 3': Read-only file system
However, I tried the Plex app again and it still cannot see subfolders in the Movies folder…It can only see them in the TV Shows folder.
pi@raspberrypi:~ $ sudo mount /mnt/usb1
mount: /mnt/usb1: /dev/sda2 already mounted on /mnt/usb1.
pi@raspberrypi:~ $ mount |grep usb1
/dev/sda2 on /mnt/usb1 type hfsplus (ro,relatime,umask=22,uid=0,gid=0,nls=utf8)
It is definitely not a read-only media. The odd thing is that this was the hard drive being used on a previous Plex Server that was running on a Mac. I never had any problems with it.
Is it possible that HFS Plus formatting could be the issue?
Linux can’t write to HFS Plus drives that have journaling enabled. It is has journaling enabled, you need to connect it back to a MacOS machine, modify the filesystem to disable journaling and then it should be good to go on linux.
You can try and force it through a remount, e.g. → sudo mount -o remount,rw,force /dev/sda2 but you might also toast it.