Announcement

Collapse
No announcement yet.

Help setting up permissions for myself and Plex

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help setting up permissions for myself and Plex

    Hi all,

    Running Kubuntu on a fresh SSD and re-using 4x NTFS drives containing my media content for accessing locally via Plex. The drives are mounted and Plex can access them but I'm struggling with the permissions so that I (as the user) can also copy, add, delete content on those drives outside of Plex.

    Drives are mounted as follows:

    sda 8:0 0 931.5G 0 disk
    └─sda1 8:1 0 931.5G 0 part /
    sdb 8:16 0 931.5G 0 disk
    ├─sdb1 8:17 0 931G 0 part /media/paul/Music and TV
    ├─sdb2 8:18 0 156.9M 0 part
    └─sdb3 8:19 0 156.9M 0 part
    sdc 8:32 0 3.6T 0 disk
    ├─sdc1 8:33 0 16M 0 part
    └─sdc2 8:34 0 3.6T 0 part /media/paul/Movies 2
    sdd 8:48 0 2.7T 0 disk
    ├─sdd1 8:49 0 128M 0 part
    └─sdd2 8:50 0 2.7T 0 part /media/paul/Movies
    sde 8:64 0 3.6T 0 disk
    ├─sde1 8:65 0 128M 0 part
    └─sde2 8:66 0 3.6T 0 part /media/paul/Movies 3

    I set Plex as the user and owner of the 4 media folders (and see same if I check the properties) but when I went in to do some housekeeping, I couldn't add, move, or delete so I've missed something in the permissions but I'm unclear what. I've added myself (Paul) to the Plex group using
    sudo usermod -a -G plex​ paul
    which results in:
    paul@MediaBox:~$ groups paul
    paul : paul adm cdrom sudo dip plugdev lpadmin sambashare plex

    I have set permission on the folders using
    sudo chmod 775 /media/paul/[name of folder]
    resulting in
    drwxrwxr-x 1 plex plex 4096 Jun 8 12:56 /media/paul/Movies
    paul@MediaBox:~$ ls -ld /media/paul/Movies 2
    ls: cannot access '2': No such file or directory
    drwxrwxr-x 1 plex plex 4096 Jun 8 12:56 /media/paul/Movies
    paul@MediaBox:~$ ls -ld /media/paul/"Movies 2"
    drwxrwxrwx 1 root root 4096 Jun 12 21:35 '/media/paul/Movies 2' Note: there is no content on this drive yet
    paul@MediaBox:~$ ls -ld /media/paul/"Movies 3" Note: I had to put the final folder name in "" as it wouldn't locate it

    drwxrwxr-x 1 plex plex 45056 Jun 15 10:03 '/media/paul/Movies 3'
    paul@MediaBox:~$ ls -ld /media/paul/Movies
    drwxrwxr-x 1 plex plex 4096 Jun 8 12:56 /media/paul/Movies
    paul@MediaBox:~$ ls -ld /media/paul/"Music and TV"
    drwxrwxr-x 1 plex plex 28672 Jun 8 13:56 '/media/paul/Music and TV'

    In short, Plex user and Plex group has 775 access to the media folders but despite adding myself to the plex group I can't Cut or move to Wastebin - what have I missed?!?

    Click image for larger version

Name:	image.png
Views:	25
Size:	61.2 KB
ID:	687133

    I'm a new linux user and have tried to resolve this myself as you can see but I'm missing something and in my inexperience don't know what.

    #2
    Originally posted by new666uk View Post
    despite adding myself to the plex group I can't Cut or move to Wastebin - what have I missed?!?
    This:
    Originally posted by new666uk View Post
    re-using 4x NTFS drives
    Check that you have package ntfs-3g​ installed.
    Windows no longer obstruct my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      I use a server for my Plex, but I get what you're after. If your set up is working for you, don't mess with it.

      My solution also allows other computer users on my network to access the files if they are in a special group.

      Here's my solution:

      "plex" is a user on your system. I created a group #560 and named it "shared". There's no significance to using 560 or "shared" I just found it available and easy to remember.

      Then I added "plex" to the group, taking care to add it as a supplemental group, not as it's primary. Then do the same for your user account(s).

      Next, I set all the media storage folders for Plex to group "shared" and set the GID "stickybit". The stickybit forces all files added to a folder with stickybit set to the group of the parent folder.

      Since Plex is a member of the shared group, it can access the files. Any user that is a member of the shared groups can also access the files. So your folders would look like:
      Code:
      drwxrwsr-x 1 nobody shared 8.8K Jun 18 06:26 /media/paul/Movies
      Note the group permissions are rws not rwx. That's the stickybit.

      I also use "nobody" as the file owner because the media folders are also exported to my other computers using NFS and I mount them and force ownership to the "nobody" user. You probably don't need to do this. Any files you add to the media folders will have the name of the user account that added them.


      As far as this comment:
      /media/paul/"Movies 3" Note: I had to put the final folder name in as it wouldn't locate it
      ​Yes, that's intended behavior. In the Linux world a space is a "delimiter" so terminal commands will treat the space as the end of the field. If you're using the terminal you can use a backslash to avoid this in a command like this. Instead of

      ls -ld /media/paul/'Movies 2' or '/media/paul/Movies 2' you can use ls -ld /media/paul/Movies\ 2

      Most people just avoid using spaces in file names and use an undercore or dash instead like /media/paul/Movies_2
      Last edited by oshunluvr; Jun 18, 2025, 12:32 PM.

      Please Read Me

      Comment


        #4
        Another thing, Unless you are using these same folders with a Windows install, ntfs is a poor choice for a file system. You will likely run into other issues as well.

        Please Read Me

        Comment


          #5
          Thanks oshunluvr I'll give that a go. Might have questions along the way. Not sure on stickybit yet, this is my first time hearing that.

          I should have been clearer that I download content on another (Windows) PC and send them to this Linux box for storage and local playback.

          As for keeping NTFS for the drives it was because a) they were already that way, b) I didn't want to lose the content by reformatting and c) so I can see them from a Windows machine and send file to them.

          Comment


            #6
            Originally posted by new666uk View Post
            Thanks [USER="35692"]As for keeping NTFS for the drives it was because a) they were already that way, b) I didn't want to lose the content by reformatting and c) so I can see them from a Windows machine and send file to them.
            If you are talking about physically relocating the drives to a Windows machine some time in the future or dual booting Windows on your computer, then yes, you would need to keep them NTFS.

            If you are talking about setting up file sharing with a Windows machine - that's not how it works. To do that you use a networked file system and share the files. To do that with a Windows machine you would set up a SAMBA server on the host system. Any other computer remotely accessing the files would have no idea what file system was in use on the host system.

            Please Read Me

            Comment

            Users Viewing This Topic

            Collapse

            There are 0 users viewing this topic.

            Working...
            X