Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Plex - mount cifs] Unable to apply new capability set #40

Closed
Marnalas opened this issue Feb 21, 2021 · 1 comment
Closed

[Plex - mount cifs] Unable to apply new capability set #40

Marnalas opened this issue Feb 21, 2021 · 1 comment

Comments

@Marnalas
Copy link
Contributor

Marnalas commented Feb 21, 2021

Problem/Motivation

First of all, thank you for your work. I am a very grateful user of Samba NAS and Plex Media Server with NAS addons.

I am running in an issue with Plex Media Server with NAS. The addon can't mount a network disk anymore. It worked well before. As far as I can tell, this problem started appearing with the Core 2021.2.3.

Expected behavior

[12:45:00] INFO: Starting the Plex Media Server...
[12:45:00] INFO: Network Disks mounting.. //192.168**/pms
[12:45:00] INFO: Mount //192.168**/pms
[12:45:00] INFO: Success!

Actual behavior

[12:45:00] INFO: Starting the Plex Media Server...
[12:45:00] INFO: Network Disks mounting.. //192.168**/pms
[12:45:00] INFO: Mount //192.168**/pms
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[12:45:00] WARNING: Protection mode is ON. Unable to mount external drivers!

Steps to reproduce

Start the addon with a networkdisks set up. The //192.168**/pms is mounted using your SambaNAS addon.

claim_code: **
webtools: true
networkdisks: - //192.168**/pms
cifsusername: **
cifspassword: **
cifsversion: '3.0'

Proposed changes

I used docker exec -it addon_**_plex /bin/bash to investigate the problem:

  • The folder /192.168**/pms is correctly created and the permissions are correctly set up.
  • I tried to execute the mount request and ran into the same problem, even when trying to use a different directory.

The same request (mkdir -p /192.168**/pms && chown -R root:root /192.168**/pms && mount -t cifs -o username='**',password='**',vers=3.0 //192.168**/pms /192.168**/pms) runs perfectly in the homeassistant container. This makes me think that the problem comes from the docker container running the addon missing some permissions or capabilities.

Same as with the Samba NAS addon problem you solved by adding a apparmor.txt, my guess would be to add something similar so the mount capability is added to the docker container running plex.

EDIT : I tried this in a fork and I testify that it works. Thus I created a pull request for you to review : #41

Context (Environment)

Rpi4
Core Version: core-2021.2.3
Supervisor Version: supervisor-2021.02.11
Operating System: Home Assistant OS 5.11
Addon version : 2.4.2-dht2
EDIT : I tried the apparmor correction on both Home Assistant OS 5.11 and Home Assistant OS 5.12. It worked in both cases.

@Marnalas Marnalas reopened this Feb 22, 2021
@Marnalas
Copy link
Contributor Author

Just installed and tried the 2.4.2-dht3. It works !

Thank you very much. Have a nice day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant