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

Sub directories under data dir are not owned by plex #61

Open
geek-baba opened this issue Jun 20, 2019 · 5 comments
Open

Sub directories under data dir are not owned by plex #61

geek-baba opened this issue Jun 20, 2019 · 5 comments

Comments

@geek-baba
Copy link

The mounted claim under data directory have root as the owner, I even tried to update the deployment and passed the uid and gid, however the sub directories still owned by root. Not sure if this is being developed actively but, great concept!

@scruplelesswizard
Copy link

Hello @shwetkprabhat, thank you for your issue!

Can you provide a little more detail about your request? Do you expect that the data directory would be mounted as a specific user, or do you expect that kube-plex would chown the data directory recursively?
My apologies, I am not exactly sure what you mean with 'claim'. Is this somehow in reference to the Plex Claim Token?

@geek-baba
Copy link
Author

hello @chaosaffe, I am expecting that the data directory would be mounted as a specific user.

@geek-baba
Copy link
Author

@chaosaffe I did not clarify the claim question, its basically the media dataset on a nas server, defined by persistence.data.claimName

@Krm1t
Copy link

Krm1t commented Mar 26, 2020

Hey

I'd like to expand on this issue as i think i have the same problem.
Let's first get my setup out of the way.
Data is stored on my NAS let's just call it Storage
kube-plex is hosted on my kubernetes server called master-node
Data is accessed via nfs PersistantVolumes (data volume defined below)

apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv-nfs-shared-media-1
  labels:
    bucket: shared-media
    location: nfs
spec:
  capacity:
    storage: 999T
  volumeMode: Filesystem
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  nfs:
    server: storage.mydomain.local
    path: "/volume1/kubernetes/media"
  mountOptions:
    - rw

Once kube-plex is up and running i do a port-forward to access plex so i can set up the server.
When i go to add a new library and i browse the \data folder i can't see any subfolders in it even though i know they exist (in the nfs share). If i add the library anyway and scan for files then none are found.
I started by looking at the PV as i thought i had done something wrong there but after looking over it several times i concluded that it should be working just fine as i practically mirrored the config pv which was working fine.
So i turned my focus to the pod instead. So i accessed it (i.e. kubectl exec) and there i found the following permissions on the /data directory:
drwxrwxrwx 4 plex plex 4096 Mar 26 20:46 data

Notice plex is the user and group - This makes sense.
But if i enter the /data directory i get this:
-rwxrwxrwx 1 1026 users 2596802818 Mar 7 2019 somemoviefile.mkv
drwxrwxrwx 3 1026 users 4096 Jan 16 21:08 movies

Now it makes sense that plex cannot see the files and folders as the plex user does not have access to those files and folders.
If i understand @geek-baba correctly then this is his problem as well.
If it's not the same then plz say so and i'll create a new issue instead.

As i write this i realize that this may not actually be a kube-plex issue but a kubernetes issue instead. Unfortunately i'm not a kubernetes expert so i don't know for sure.

@geek-baba
Copy link
Author

Yes same issue, its definitely kube-plex issue and I could not use this at that time, now I see you have ability to mount multiple directories and that should solve the issue. I use plexinc image and have no permissions issues. This could also be solved if kube-plex let me set the uid and gid of the container before it starts.

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

3 participants