permissionsdebianowncloudplex

Plex and Owncloud shared folders permission issues


I am setting up a multimedia server on Debian 8.

I installed both Plex and Owncloud. I have set up /var/media as my Owncloud default folder. I decided to create a folder Library at the root of Owncloud. So the folder path is:

/var/media/admin/files/Library

I changed the permissions of media with:

chmod 770 -R /var/media

On top of that, all the files in /var/media are owned by www-data:www-data.

In order to make Plex see my medias, I have added the user plex to the group www-data. I would like to create a library watching my /var/media/admin/files/Library folder but I have a problem, Plex doesn't see neither the files or folders in /var/media. Here is a screenshot:

enter image description here

To finish, I have tried to connect on my server via ssh with the plex user, and it sees files and folders inside /var/media.

What am I doing wrong? Maybe it is not a permission issue? Thanks

Update

If I change the ownership of /var/media to plex:www-data, it works. But I can't understand why it doesn't work for www-data:www-data. So it is well a permissions issue.

If I launch id plex, I have:

uid=107(plex) gid=33(www-data) groups=33(www-data)

Just to remind, here are the permissions of /var/media folder (full permissions for group...):

drwxrwx---  4 www-data www-data 4096 Oct 30 09:01 media

Solution

  • I assume from your post that Plex, Linux OS, and your media are all contained on the same machine and that there are no separate computing devices being used here as that would mean additional steps are required.

    In all likelyhood, plex won't be able to list your files because the mode 777 is required to list files in a directory even if the files themselves are set more restrictively than 777 e.g. 750. From what I can tell, your chmod command has set all the directory permissions to 770 which would break the listing capability. As it happens I've just yesterday written a guide over on Tech-KnowHow that covers this, and within that I have described how to set all your folders to 777 and your files to something else. That way it works with plex (and other systems for that matter). I've essentially chosen the same solutions as you in that I use the group to assign the permissions and make sure the everyone / other mode is set to apply no permissions.

    There's a direct link to the article below, you'll need to click on the implementation page and look for the find command under the 'Apply correct modes' heading. I've also included how to keep your ownership consistent through samba which is useful when copying new files across. Let me know how that goes in the comments and I'll help you out where I can while it's still fresh in my mind. Good luck!

    https://www.tech-knowhow.com/2016/03/how-to-plex-permissions-linux/