# How to allow Plex ánd Nextcloud access to external HDD

**URL:** <https://help.nextcloud.com/t/how-to-allow-plex-and-nextcloud-access-to-external-hdd/12030>\
**Category:** ℹ️ Support\
**Created:** [May 1, 2017, 9:25pm UTC](https://help.nextcloud.com/t/how-to-allow-plex-and-nextcloud-access-to-external-hdd/12030 "2017-05-01T21:25:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![glotzbach](https://help.nextcloud.com/letter_avatar/glotzbach/32/5_5575768a8748004e209b776fc1b2916d.png) [@glotzbach](https://help.nextcloud.com/u/glotzbach)\
**Post date:** [May 1, 2017, 9:25pm UTC](https://help.nextcloud.com/t/how-to-allow-plex-and-nextcloud-access-to-external-hdd/12030/1 "2017-05-01T21:25:06Z")

</div>

It’s been quite an undertaking but I’m almost finished: a raspberry pi 3 with VPN, webserver with Nextcloud and Plex. There’s a few things that I still wanted to edit and one of them is the following:

To my WD-Pi set-up, I have attached an external HDD, that holds all my media (photos, homevideos, our CD-rips, etc). The issue is: I want both Nextcloud and Plex to have access. I don’t seem to get this combination working.

Following [this answer](https://superuser.com/a/695186) on [superuser.com](http://superuser.com) 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](https://help.nextcloud.com/t/you-dont-have-permissions-to-upload-or-create-files-here-local-external-ntfs-3g-storage/5420/4)) 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 _(eg, 10.0.2)_: 11.0.3 (stable)  
Operating system and version _(eg, Ubuntu 16.04)_: Raspbian Jessie  
Apache or nginx version _(eg, Apache 2.4.25)_: Apache  
PHP version _(eg, 5.6)_: 7.0.16  
Is this the first time you’ve seen this error?: yup, changing umask values & mounting makes Plex & Nextcloud (not) work

---

<div class="post-metadata">

**Author:** ![Lox](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lox/32/881_2.png) [@Lox](https://help.nextcloud.com/u/Lox)\
**Post date:** [May 1, 2017, 10:23pm UTC](https://help.nextcloud.com/t/how-to-allow-plex-and-nextcloud-access-to-external-hdd/12030/2 "2017-05-01T22:23:06Z")

</div>

What are the permissions on the /CloudMEDIA mount point ?

BTW, I would use NTFS or, better, a linux filesystem.

---

<div class="post-metadata">

**Author:** ![glotzbach](https://help.nextcloud.com/letter_avatar/glotzbach/32/5_5575768a8748004e209b776fc1b2916d.png) [@glotzbach](https://help.nextcloud.com/u/glotzbach)\
**Post date:** [May 1, 2017, 10:49pm UTC](https://help.nextcloud.com/t/how-to-allow-plex-and-nextcloud-access-to-external-hdd/12030/3 "2017-05-01T22:49:27Z")

</div>

Hey there,  
Thanks for your reply. vfat partitions [cannot have permissions](https://askubuntu.com/a/118200) set in another way then describing them in fstab:

> [@glotzbach](#):
>
> uid=pi,gid=mediausers,umask=003

.

> [@Lox](#):
>
> BTW, I would use NTFS or, better, a linux filesystem.

Totally agree. But the drive already holds all of my media files and I don’t feel like changing/migrating that atm. Will do at some point in future I guess.

---

<div class="post-metadata">

**Author:** ![Lox](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lox/32/881_2.png) [@Lox](https://help.nextcloud.com/u/Lox)\
**Post date:** [May 1, 2017, 11:02pm UTC](https://help.nextcloud.com/t/how-to-allow-plex-and-nextcloud-access-to-external-hdd/12030/4 "2017-05-01T23:02:51Z")

</div>

I’ve never added these fstab options for fat drives but I use set proper permissions on the mount point and that just works. That is why I was asking about the permission you have on /CloudMEDIA.

---

<div class="post-metadata">

**Author:** ![glotzbach](https://help.nextcloud.com/letter_avatar/glotzbach/32/5_5575768a8748004e209b776fc1b2916d.png) [@glotzbach](https://help.nextcloud.com/u/glotzbach)\
**Post date:** [May 1, 2017, 11:16pm UTC](https://help.nextcloud.com/t/how-to-allow-plex-and-nextcloud-access-to-external-hdd/12030/5 "2017-05-01T23:16:49Z")

</div>

Ok. I had already made pi the owner and set mediausers as the group:  
`sudo chown -R pi:mediausers /CloudMEDIA/`  
`sudo chmod -R 775 /CloudMEDIA/`  
And consequently:  
`drwxr-xr-x 18 pi mediausers 32768 jan 1 1970 CloudMEDIA`

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [September 23, 2024, 6:16pm UTC](https://help.nextcloud.com/t/how-to-allow-plex-and-nextcloud-access-to-external-hdd/12030/6 "2024-09-23T18:16:33Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 9, 2024, 1:22pm UTC](https://help.nextcloud.com/t/how-to-allow-plex-and-nextcloud-access-to-external-hdd/12030/7 "2024-12-09T13:22:38Z")

</div>


