If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
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!

User does not change

I have been trying to get plex to work on my raspberry pi. I have followed the instructions here: https://thepi.io/how-to-set-up-a-raspberry-pi-plex-server/
It works great up until where I need to change permissions. I need to change the permissions because the hard drive that is hooked up to it is owned by pi. However when I change the user to pi and restart the service. It does not ever run plex media server as pi, only as plex.
I need help, thank you in advance. I can't find anything helpful online.

Best Answers

Answers

  • cambam135cambam135 Posts: 6Members

    Thank you so much for your help. I have followed the instructions in the customizing your plex configuaration page, and I have made progress with my plex server. It now starts a few of the processes as pi, but a few of the processes that were running when it was under plex are not there. I cannot see the server from the browser. It starts /usr/lib/plexmediaserver/plex media server, but it does not start the plex plug-in, plex dlna server, plex tuner service, or a second second plex plug-in.
    I only know this because if I change it back to plex, those are the processes that start running. When I change it back to pi, I only get one.
    I am assuming it has something to do with permissions, but I don't know on what. Do you have any suggestions for me?
    I really appreciate your help. I actually feel like I am learning a lot about linux and what goes into a server.

  • ChuckPAChuckPA Posts: 21,673Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member
    edited December 2017

    do you have enough functionality to get the Plex logs from PMS? (settings - server - help - download logs)

    if not, /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs contains everything I might need in addition to

    sudo journalctl -xe | grep -i plex

    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

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

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

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

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

     
  • cambam135cambam135 Posts: 6Members

    I do not have enough functionality to download the logs, and /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs is empty. However, this is my journalctl output:

    Although I just thought of something that might be it. You said that the article I followed was obsoleted a year ago. Is there a new way I should install on a raspberry pi? I looked at the installation page, and it is ubuntu based, but it is 32bit instead of 64bit. Is there a newer set of instructions I should I to try and install on a raspberry pi?

  • ChuckPAChuckPA Posts: 21,673Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    You can't run PMS as user root
    ``
    Dec 29 18:54:52 frandsenplex sudo[1011]: pam_unix(sudo:session): session closed for user root
    Dec 29 18:55:05 frandsenplex sudo[1038]: pi : TTY=pts/0 ; PWD=/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs ; USER=root ; COMMAND=/bin/journalctl -xe
    ```

    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

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

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

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

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

     
  • ChuckPAChuckPA Posts: 21,673Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    Show me your /etc/systemd/system/plexmediaserver.service.d/override.conf please ?

    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

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

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

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

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

     
  • cambam135cambam135 Posts: 6Members
    edited December 2017

    Of coarse!! I really can't thank you enough. I have spent upwards of 15 hours trying to get this to work.

    #
    # Customize Plex's config
    #
    # Identify this as a service override
    [Service]
    #
    #  Move the data directory
    #Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/plexdir/Library/Application Support"
    #
    #  These values are only needed if you wish to change user & group
    User=pi
    Group=pi
    #
    # This is needed to change the default umask     
    #UMask=0002    # this must be 4 digits of octal 
    

    From what I understand(which isn't much because I am still a noob) I thought pi is just a normal user, and not root. I don't really understand how I am trying to start it up as root...

    Moderator Edit: Used triple-grave on preceding and succeding lines for formatting

  • cambam135cambam135 Posts: 6Members

    Sorry for the weird formatting on the last comment.

  • cambam135cambam135 Posts: 6Members

    You were right, I had to change the permissions and ownership of the override file. I also had to change the ownership of the /var/lib/plexmediaserver folder. After that, it all started up perfectly. I am so grateful for your help. I am amazed at how quickly you responded and how helpful you were. Thank you.

  • aamzraamzr Posts: 6Members ✭✭

    Generally, what is the benefit of changing the plex user from plex to pi?
    I did it just because the tutorials told me and it worked.
    Now after loosing some time to learn how it works with systemd I started thinking about it.

  • uglymagoouglymagoo Posts: 898Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja
    edited January 31

    @aamzr said:
    Generally, what is the benefit of changing the plex user from plex to pi?
    I did it just because the tutorials told me and it worked.
    Now after loosing some time to learn how it works with systemd I started thinking about it.

    There is no benefit and the third party tutorials are doing it wrong. Neither the official Plex Linux guides nor my "official" Pi guide tell you to do something like that :) It's just that most tutorials on the net are written by people, who do not know what they are talking about :)

    Official instructions for Plex Media Server on the Raspberry Pi 2 and 3 / Banana Pi / ODROID / many more : armhf and arm64 Debian Repository
    My PMS hardware: RPi 2, NVIDIA Shield TV, Intel Xeon

  • moviebrainmoviebrain Posts: 10Members, Plex Pass Plex Pass
    edited April 16

    EDIT: Sorry, going to post a new topic when I've done more research. Sorry for necroposting to this old thread!

  • uglymagoouglymagoo Posts: 898Members, Plex Pass, Plex Ninja, TunerTester Plex Ninja
    edited April 16

    @moviebrain If your external drive uses ext3/ext4 or any other Linux file system, then I have a nice and clean solution for you: Just create the directory "Plex Versions" at the top of your corresponding library directory and make it owned by plex (e.g. mkdir "Plex Versions" && sudo chown plex:plex "Plex Versions"). Then select the appropriate "Versions storage location" when creating optimized versions, i.e. not "in folders with original items".

    https://support.plex.tv/articles/213095317-creating-optimized-versions/

    If your drive is FAT32 or NTFS you might have to change the mount options in /etc/fstab. Please tell us about your current fstab entry for your external drive.

    Official instructions for Plex Media Server on the Raspberry Pi 2 and 3 / Banana Pi / ODROID / many more : armhf and arm64 Debian Repository
    My PMS hardware: RPi 2, NVIDIA Shield TV, Intel Xeon

  • moviebrainmoviebrain Posts: 10Members, Plex Pass Plex Pass
    edited April 16

    Thank you @uglymagoo wow, of course it would be that easy :) my brain doesn't always completely understand permissions. Thanks for your hard work :) it works flawlessly!

    Yep, it's ext4, and making the one folder world-readable but writable only to plex is so very clean! I sometimes forget that the things highly restricted users write can still be read by the admin user too!

Sign In or Register to comment.