I have a working owncloud and plex installation. Now I want to have a shared folder between these two. I have created a folder /Music and have added it as external storage in owncloud and as library in plex.
My problem is that I cant set the permissions on the folder to get both working.
Owncloud uses the user www-data and plex uses the user plex.
If I set chown -R www-data:www-data /Music only Owncloud can read and write files. If I set chown -R plex:plex /Music only Plex can read and write files.
But now I have added the user plex to the group www-data with usermod -a -G www-data plex and groups plex gives me plex: plex plugdev www-data
Then I changed the permission with chmod -R 775 /Music
But Plex cant access the folder on the webapp. If I type sudo -u plex touch /Music/newfile it works. But the webapp only works if I set the owner and group of the folder to plex. I have tried to add the www-data user to the group plex but than owncloud cant access the folder. Owncloud seems to work only if the user and group is set to www-data.