Plex Media Folder Permissions

I can’t be the first person to run in to this problem

Example:
Quickbox user ID called Admin

Plex media folder is located /home/admin/media
Plex user (default install) can see the folder, but not make any changes (delete)

I have a few choices.

CHMOD the permissions to allow everybody to read write, this means any new content needs to get the permissions changed. An alias or crontab would work, but yuck!

Run the Plex app as admin - fixes the permission problem, but adds additional problems with Plex library permissions and possible problems with updates.

Third option is to run Plex as root. Fixes the permissions problems, but I’m pretty sure I’m not supposed to be doing that.

I’m currently using answer 3, but there must be another way.

I was wondering if groups are the answer. How do I make a group that Plex and I can both write files in my home directory ? Has anybody encountered this before?

Have you tried to adjust your permissions as follows:

username=USERNAMEHERE!!!
usermod -a -G ${username} plex
chown ${username}:plex /home/${username}
chmod 750 /home/${username}
setfacl -m g:${username}:rwx /home/${username}
3 Likes

This looks like exactly what I’m asking for,
1 adds “admin” to the group plex
2 changes the group owner of admin’s home dir from admin to plex
3 changes the permissions of the home dir to user & group to read/write/execute (won’t this break my .ssh folder again?)
4. modifes the ACLs of homedir to read/write/exectute (do ACLs apply to new files?)

Rather than possibly destroy my home directory, is it possbile to do this one level deeper and chown/chmod the /home/admin/media folder?

This will not destroy your directory :wink:
I’ve brewed this fix for a few people and all without consequence… other than stuff working. the .ssh directory should remain in tact as it still retains the permissions of the user.

If you wanted to, Plex still may not read it as a result of bad permissions on your top parent directory. Although, no harm in trying it :slight_smile:

yes. It should be fine. I would actually just add the the plex user to the admin users group instead…I wonder if that would fix the issue.

useradd -a -G {group-name} plex

thanks for the replies folks, will have a tinker later :slight_smile:

Just a heads up, the method above with CHMOD /chown changing the home group to Plex does indeed screw with .SSH and certificates. I don’t have a lot of time at the min to go digging, but will investigate a little further after lunch :slight_smile:

I’ll read the posts about it from last time and see if I can find exactly where the problem lies. I think it’s the home directory itself. We will see :slight_smile:
If things go horribly wrong I’ll create a new user and copy those permissions

Edit: thanks to @jmsolo sharing his fixes, I was able to run the command in this post: SSH Authorized Keys (probably permissions)

Oops, thanks for linking in that other article wherein I had to fix my fix :blush:.

I’ll set this up as a FAQ on the new site, I know for those with ssh key authentication, this will be handy.

FAQ Updated!
https://quickbox.io/ufaqs/plex-cannot-readwrite-my-media-directory/

I had the same problem after a fixhome and your solutions worked perfect ! thx :slight_smile:

Sorry this didn’t work for me.

First of all >

usermod -a -G ${username} plex

Will add “plex” to the group of the user.

chown ${username}:plex /home/${username}

Will make the user and the group “plex” the owner of the user home. This doesn’t make sense. Why would I add plex to the user group and them give the plex group ownership of the user home?

Anyway when I check with

ls -l /home/user
It shows no change. plex group is still not owner of the home dir and plex can’t write to the home dir.

I think the problem is that this only gives access to the main home folder but not any of the existing subfolders.
Please help.