Error when trying to remove a file

Server Version#: 1.27.1.5916
Player Version#: 4.84.1

Hello,
I have a Plex Server docker instance running on my Unraid server. It’s auto-updated every day, and so far, I had no problems. But for the last couple of weeks, I am unable to remove files anymore.

The option to remove media files is properly set, and I can click on it in the website, but it is showing a “An error has occured” message right after.

At the same time, the console always shows the following entries:

Jun 26, 2022 02:47:24.965 [0x153eff2d1b38] Info — Request: [86.252.98.119:58824 (WAN)] DELETE /library/metadata/20594 (7 live) TLS GZIP Signed-in Token (skbo) (Safari)
Jun 26, 2022 02:47:24.969 [0x153f1b117b38] Info — Completed: [86.252.98.119:58824] 400 DELETE /library/metadata/20594 (7 live) TLS GZIP 3ms 509 bytes (pipelined: 1)
Jun 26, 2022 02:47:40.038 [0x153f1ae8bb38] Attention — [HttpClient] HTTP error requesting GET http://192.168.1.174:1990//WFADevice.xml (1, Unsupported protocol) (Received HTTP/0.9 when not allowed)
Jun 26, 2022 02:47:40.038 [0x153f1a73eb38] Erreur — SSDP: Error parsing device schema for http://192.168.1.174:1990//WFADevice.xml

I first tried directly from inside the container, and I can do a rm <file> with no problem.

I checked that the com.plexapp.plugins.library.db database is correct (PRAGMA integrity_check; returns ok), and I also tried with older backups, to no avail.

I also removed all the databases and restarted my server, in order to restart from scratch, added a new library located to the same path, and though my files were correctly shown, I still couldn’t remove them.

What else can I check?

Check your server logs odds are its a file permission for the user account that Plex is running under.

Thanks for your answer. I checked the server logs (for a different time, I tried to delete an element at ~15:51):
Plex Media Server Logs_2022-06-26_15-51-45.zip (5.5 MB)

I don’t see anything out of the ordinary, and no permission errors.

What file where you removing?

It was a mp4 file, I tried with multiple videos, and it’s always the same result.

If you can provide the exact file name of the file you are trying to delete in those logs, I can see if there is anything relevant in the logs

Yes, of course, it was Ecran Large - S00E386 - JURASSIC WORLD 3 LE MONDE D’APRÈS - fantasme de fan, cauchemar de cinéma [M7hQMH6A_OI].mp4.

I am not seeing anything in the those logs pertaining to that file. However I will note that filename contains non-ASCII characters, any chance you can try it with a file that has an ASCII name? I have run into UTF-8 encoding issues myself before in different file systems.

I have been able to fix my problem, which is a permission problem, though nothing in the logs shows it.

This may be a consequence of the latest Unraid upgrade that changes how Docker containers run. The files I wanted to delete were owned by a specific user and group, and the Plex Docker container was running with another one which is not root, though the container execs everything as root, so that explains why I could remove files directly from the container but not from Plex. chown on the right directory (and updating the processes that were creating these files to chown them) fixed the problem I was having.

I am still trying to understand why the logs were not showing anything about permission errors, that should be the least to do.

Anyway, thank you @dbirch for your help.

1 Like

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