Can't delete media files or create DVR recording - new install

Server Version#: 1.19.1.2645
Player Version#: 4.31.2
OS: Ubuntu 18.04.4 LTS

I have used Plex on Ubuntu for a few years now. With all the permissions issues people had, I just created the main user as plex, and everything worked as advertised. I have a Plex pass for DVR recordings.

I decided to repurpose a newer computer as my plex server. I did a fresh Ubuntu 18.04.4 install, and again set the user as plex. I installed the plex app through Ubuntu Software, and copied my media files into my /home/plex/videos directory structure. I mapped the new libraries and everything plays file, but I cannot delete the files after playing. I also cannot create any recordings with the DVR (I have an HD Homerun) with the error message “no write access to destination”. If I change the .grab directory to owner “root”, it will record, but not transfer to the final directory. It appears the Plex app seems to be running as root instead of plex.

I decided to reinstall the server. I uninstalled using Ubuntu Software, and downloaded the package from the plex site instead of through Ubuntu Software. It is installed as a snap package. This didn’t make any difference. It’s not clear to me how much of the old install was removed, as a lot of the config information was still there after I installed the new download.

So this appears to be a permissions issue, but I don’t how to correct it. I am somewhat familiar with linux, but I thought I was avoiding all the permissions issues with how I setup the install.

Plex Media Server Logs_2020-04-20_20-08-12.zip (1.0 MB)

Moderators, any help here? I’ve done some more investigating, but being that the plex server is now a snap application, I’m not sure what all previous debug suggestions are still applicable.

I ran the command ‘journalctl -xe | grep plexmedia’ and it looks like there is an issue creating /var/lib/plexmediaserver.

journalctl-logs.txt (3.0 KB)

I also ran the command ‘snap logs plexmediaserver’ and the output included this error

‘2020-04-28T18:46:37Z -[3175]: Plex Tuner Service: Critical: libusb_init failed’

snap-logs.txt (965 Bytes)

It appears I have a bad USB port on my system, but I do not have anything hooked up to it. Could this be causing the permissions issues? Is there a way to ignore this bad port?

Your logs tell a somewhat different story than expected.

DNS lookup failure and changing (DHCP config ?? )

Apr 20, 2020 17:23:42.984 [0x7fd3b3fff700] ERROR - Error issuing curl_easy_perform(handle): 6
Apr 20, 2020 17:23:42.984 [0x7fd3b3fff700] WARN - HTTP error requesting GET https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx&includeProfiles=1&includeProviders=1 (6, Couldn't resolve host name) (Could not resolve host: plex.tv)
Apr 20, 2020 17:23:42.984 [0x7fd3c11bc700] ERROR - Error issuing curl_easy_perform(handle): 6
Apr 20, 2020 17:23:42.984 [0x7fd3c11bc700] WARN - HTTP error requesting GET https://plex.tv/media/providers?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx (6, Couldn't resolve host name) (Could not resolve host: plex.tv)
Apr 20, 2020 17:23:42.984 [0x7fd3c11bc700] ERROR - Error parsing content.

The problem deleting & recording is due to lack of permission to write (or modify).

5cffa17e7a46ec001d2cac2c/2020 parentIndex: 2020 parentTitle: Season 2020 ratingKey: plex%3A%2F%2Fepisode%2F5e9132785d5c390040064d3a title: WCCO 4 News at Five type: 4 year: 2020' to library item
Apr 20, 2020 17:24:22.555 [0x7fd3b37fe700] DEBUG - Grabber: checking for 769 MB of available disk space in grab path and 100 MB in the transcode cache path
Apr 20, 2020 17:24:22.556 [0x7fd3b37fe700] DEBUG - Grabber: Saving recording to "/home/plex/Videos/TV Shows/General/.grab/da5f01e584d585b5141065e230f5cec09326f16d-3f8d0abfc1e0bd1e2de7c28bfa5456da51809937"
Apr 20, 2020 17:24:22.556 [0x7fd3b37fe700] ERROR - Grabber: No write permission.
Apr 20, 2020 17:24:22.556 [0x7fd3b37fe700] DEBUG - Grabber: Operation for 'WCCO 4 News at Five - WCCO 4 News at Five' on channel 4.1 completed with status error (No write access to destination)
Apr 20, 2020 17:24:22.556 [0x7fd3b37fe700] DEBUG - Activity: Ended activity 553ab2a1-ccb0-4bc7-a2d9-16b3278a94be.
Apr 20, 2020 17:24:22.556 [0x7fd3b37fe700] DEBUG - Activity: updated activity 9afb9ba4-ec6f-45be-ab76-177944fca8e7 - completed 100.0% - Refreshing Sub
Apr 20, 2020 17:24:22.556 [0x7fd3b37fe700] DEBUG - Activity: Ended activity 9afb9ba4-ec6f-45be-ab76-177944fca8e7.
Apr 20, 2020 17:24:22.556 [0x7fd3b37fe700] ERROR - Grabber: Starting media grab failed.

As for the permissions, setting the owning ‘group’ to plex is perhaps the easiest way to allow user plex to write to where your media is.

I have created this How-To as a means of setting up permissions and then forgetting them as the mechanism is self-propagating

Thank you for the quick response.
I normally have a VPN enabled, and had that going when I installed the plex server. That may be why there were DNS/DHCP issues.

The only user on my system is “plex”, so the only user/group for all my media files/directories are plex/plex. This worked fine on my old system. I had reviewed your article on automating Linux permissions, but that didn’t seem to apply as plex is the only user/group already. I found that if I created a .grab directory and gave it 777 permissions (wide open), then a DVR recording would be made in that directory, but it wouldn’t move it to my media folder unless I also gave that directory 777 permissions. Even with doing that, I could not delete any files from within the webapp. Somehow is still seems that permissions are not correct, even though plex is the only user on the system.

if you are running in a container, you need to make sure make sure that the user inside the container matches the system.

even if the name is the same, the actual UID# may be different.

also, normally plex installer will create it’s own plex user, you should not need to do this yourself.

nor should you be logging in as the ‘plex’ user.

SOLVED: I removed the snap version of plexmedia server (from the Ubuntu Software Store) and did a manual install of the .deb package from the plex website. The issue must be that a SNAP application user is different than the base system user, even though they are both “plex”. This was noted by TekoJuny. I also needed to access the webclient through the IP address:32400 instead of app.plex.tv for the media server to be discovered again. Once through that process, I am able to use app.plex.tv again, and don’t need to anything with directory permissions.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.