Trying to make my superPi (with Plex, Nextcloud, VPN), I have a permissions problem on my external HDD:
I have attached an external HDD to my Raspberry Pi, that holds all my media (photos, homevideos, our CD-rips, etc). I want both Nextcloud and Plex to have access, but I don't seem to get this combination working.
Following this answer I created the group mediausers and added the users plex and www-data:
sudo groupadd mediausers
sudo usermod -a -G mediausers plex
sudo usermod -a -G mediausers www-data
The drive was (already before connecting it to my Pi) formated as vfat (or so it appears on the Pi). With the following line on /etc/fstab I mounted the drive (partly based on this post on the Nextcloud forum) with mediausers as the group:
UUID=1B1C-14D8 /CloudMEDIA/ vfat nofail,uid=pi,gid=mediausers,umask=003 0 0
Without umask Plex happily serves my pictures but I get a 'you don't have permission to create or upload in this folder'-error in Nextcloud. With the umask Nextcloud is happy and allows me to do what I want, but Plex doesn't serve any media anymore ('Unavailable; please check the necessary drive is mounted').
How can I make both Plex, Nextcloud and myself happy? How do I get file/mount permisssions right? Any help much appreciated!
Nextcloud version: 11.0.3 (stable) Plex Media Server Version: 3.5.0 Operating system: Raspbian Jessie Server version: Apache/2.4.25 (Raspbian) PHP version: 7.0.16