Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

DVR Issue (Write Permission Issue)

Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass

My DVRs are failing due to write permissions. I have Plex set up to run as my user account and the folders are set up where I am the owner, and my group and all others have read and write permissions. However, when I have something set up with a folder to record every episode they fail as they do not have write permissions. If I go to record a new show it will record properly but the folder it sets up has no one listed as the owner, my group listed with read access and others listed as having read access. Any insight into how I can correct this?

Best Answer

  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass
    Accepted Answer

    Since it looks like it should be working now I deleted the dvr schedule for that particular show (there was another airing at 10) and set up a new one and all is working now. Thanks so much for all of your help!!

«1

Answers

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    PMS (user plex) needs permission to write to the directory just as you do.

    Please see my Linux tips as I show multiple methods of working with this.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass
    edited August 3

    I have it set so that anyone has write and read access to the directory so it should be able to write... the directories it is creating however have no one listed as the owner... could it be an issue with how I changed the user? My plexmediaserver file under /etc/default is (also did I miss a step switching something in /etc/passwd? I'm new to linux):

    # default script for Plex Media Server
    
    # the number of plugins that can run at the same time
    export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
    
    # ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
    export PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
    
    # where the mediaserver should store the transcodes
    export PLEX_MEDIA_SERVER_TMPDIR=/tmp
    
    # uncomment to set it to something else
    # export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}/Library/Application Support"
    
    # the user that PMS should run as, defaults to 'plex'
    # note that if you change this you might need to move
    # the Application Support directory to not lose your
    # media library (match what is in /etc/passwd)
    export PLEX_MEDIA_SERVER_USER=santo
    
    # Uncomment this to use syslog for logging instead of
    # sending logs to Plex Media Server.log
    #export PLEX_MEDIA_SERVER_USE_SYSLOG=true
    

    Moderator edit: 'Code' paragraph formatting applied for legibility.

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    Which distribution and version please?

    What does cat /proc/1/comm return?

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass

    Ubuntu 16.04... when I do cat /proc/1/comm it says systemd

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    That explains your issues:

    /etc/defaults was discontinued over a year ago when SELinux and bash became super security conscious.

    I needed to implement full systemd support for PMS on Ubuntu and all systemd systems.

    Now you create /etc/systemd/system/plexmediaserver.service.d/override.conf. In it, you override the values you used to in /etc/defaults.

    If you look here https://forums.plex.tv/discussion/277724/moving-pms-library, at the top, you'll see how you can customize your PMS library location easily and permanently. This file persists even after you remove PMS. I do not track it. In the example I provide, you see the most commonly used override variables.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass
    edited August 4

    I stopped the plexserver, made the plexmediaserver.service.d folder (as root) under /etc/systemd/system and override.conf inside that folder with the following and then started it again and it still did not work... did I miss a step?:

    #
    # Customize Plex's config
    #
    #  These values are only needed if you wish to change user & group
    User=santo
    Group=santo
    #
    # This is needed to change the default umask 
    UMask=0002    # this must be 4 digits of octal 
    

    Moderator edit: "Code" formatting for legibility.

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    Where is PMS's "Application Support" directory. ?

    Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Application Support"

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass

    I added that in (but did lib/plexmediaserver/Library as that was the folder I had) then did systemctl daemon-reload and systemctl start plexmediaserver and it is no longer finding my server... my override now shows:

    #

    Customize Plex's config

    [Service]
    Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support"
    #

    These values are only needed if you wish to change user & group

    User=santo
    Group=santo
    #

    This is needed to change the default umask

    UMask=0002 # this must be 4 digits of octal

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    Let us skip this override for now.

    Your DVR is failing with Write permission problems. Which directory is it trying to write to? Into the Plex Library or elsewhere?

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass

    An external harddrive mounted to /media/santo/NAS(the drive)/Video/

    anytime I go to dvr a random show to test it out it works but puts it in a folder with the user permissions with no owner, group santo with just access rights and others with access rights... anything I have set to dvr automatically it fails due to write permissions errors... any of the random shows I dvr that work I can only delete through Plex

    I really appreciate all the help you are providing! Sorry for the basic understanding of linux I've only used it for my Plex server I have had for about a year or two but haven't had to do much on it since I set it up

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member
    edited August 4

    NOW, I see what's happening. it's not the override or anything of the kind.

    Did you mount the drive in /etc/fstab to prevent default linux security from taking over? /media/santos (matching your username) is a common mount method for GVFS (dynamic / auto mounts)

    Is the drive a USB or network drive?

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass

    I think fstab... I have one that is SATA plugged into the server itself and another one on the network I'm not currently using

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    Can you look at fstab and see what's mounted?

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass
    edited August 6

    the 192.168.1.7/Public is my network drive which is what I used originally until I got the external harddrives... I'm guessing the other one would be my other mount "NAS"... Also as of right now my Plex Server is showing up as unavailable and there is a new one that is running

     # /etc/fstab: static file system information.
     #
     # Use 'blkid' to print the universally unique identifier for a
     # device; this may be used with UUID= as a more robust way to name devices
     # that works even if disks are added and removed. See fstab(5).
     #
     # <file system> <mount point>   <type>  <options>       <dump>  <pass>
     # / was on /dev/sda1 during installation
     UUID=b69f90f3-1661-457f-8838-829058e18fa3 /               ext4    errors=remount-ro 0       1
     # swap was on /dev/sda5 during installation
     UUID=9ed114c5-2a4e-44f3-b82f-3c5cd1e86a61 none            swap    sw              0       0
     //192.168.1.7/public /media/Plex cifs guest 0 0
    
  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass

    The new server that is working doesn't have access to my external storage... could it be the override we set up and me having a password the problem?

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    Please use the procedure I show here https://forums.plex.tv/discussion/279063/using-ext-or-ntfs-drives-internal-or-external-on-linux#latest

    Put your other drives (your media, including where DVR saves) in that structure.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass

    Ok I have that all set... how do I get my plex server back and running? After the other things we did my server is no longer working and shows up as unavailable and the one that is running has access to nothing on my computer

  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass

    Any idea where it went wrong? My plex server says unavailable and there's a second server that shows zero folders or files on my computer

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 14,893 Plex Team Member

    My apologies for the delay. I was away (a couple vacation days).

    Please do the following.

    sudo sh
    systemctl reset-failed
    systemctl start plexmediaserver
    
    # after it fails / prompt returns
    systemctl status plexmediaserver
    
    # and now examine the system logs
    journalctl -xe | grep -i plex
    

    Please copy/paste that output here. If the output from journalctl is HUGE, please put it all in a text file and attach the text file instead.

    Next,

    df -m
    

    Let me see what is mounted where

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support forums: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility List

     Reporting Plex Server issues | Plex Media Server FAQ

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements | Linux Tips

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • Dante087Dante087 Members, Plex Pass Posts: 28 Plex Pass
    edited August 8

    Thanks so much... I didn't know if it stopped notifying you or not after a few days since it switched to "answered". You have been very helpful and I appreciate it.

    First part:

        # systemctl reset-failed
        # systemctl start plexmediaserver
        # # after it fails / prompt returns
        # systemctl status plexmediaserver
        ● plexmediaserver.service - Plex Media Server for Linux
           Loaded: loaded (/etc/systemd/system/plexmediaserver.service; enabled; vendor 
          Drop-In: /etc/systemd/system/plexmediaserver.service.d
                   └─override.conf
           Active: active (running) since Sun 2017-08-06 06:38:16 EDT; 1 day 15h ago
          Process: 1000 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_AP
         Main PID: 1007 (sh)
           CGroup: /system.slice/plexmediaserver.service
                   ├─1007 /bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/p
                   └─1009 /usr/lib/plexmediaserver/Plex Media Server
    
        Aug 06 06:38:16 Media-Server systemd[1]: Starting Plex Media Server for Linux...
        Aug 06 06:38:16 Media-Server systemd[1]: Started Plex Media Server for Linux.
        Aug 07 22:12:45 Media-Server systemd[1]: Started Plex Media Server for Linux.
        ...skipping...
    

    Second part attached as .txt

    Third Part:

        # df -m
        Filesystem           1M-blocks   Used Available Use% Mounted on
        udev                      3811      0      3811   0% /dev
        tmpfs                      767     10       757   2% /run
        /dev/sda1                52228  19792     29761  40% /
        tmpfs                     3831     24      3808   1% /dev/shm
        tmpfs                        5      1         5   1% /run/lock
        tmpfs                     3831      0      3831   0% /sys/fs/cgroup
        /dev/loop0                 101    101         0 100% /snap/menta-plexmediaserver/3
        /dev/loop1                  81     81         0 100% /snap/core/2462
        /dev/sdb1              2816505 910864   1762549  35% /disks/nas
        //192.168.1.7/public   1895094 334358   1560736  18% /media/Plex
        tmpfs                      767      1       767   1% /run/user/1000
    

    /Media/Plex is a network drive that I am no longer using for Plex... the /disks/nas is the harddrive I have connected to my plex server through SATA and I am using for plex and other things

    Moderator edit: "Code" paragraph formatting applied for readability

«1
Sign In or Register to comment.