Hard Option to Prevent Media Deletion

Is there option I can put in /etc/default/plexmediaserver to prevent the “Allow media deletion” option to ever be enabled. If Plex.tv, the server, or any number of factors that allow someone to take over an account occurs, I want to make sure the worst that can happen is they delete data in Plex itself.

Two factor auth for Plex.tv should also be implemented.

What I did was to make Plex access to the media read only…

The media is owned by another user and Plex has only read rights to it.
I have the Allow media deletion enabled but it just removes the item in question from the database.

2 Likes

That is what I originally tried a couple of years ago. But for some reason, some media would not show up unless there was write access to library. I’ll try it again as a precaution.

There are a few things that you can’t do with that type of configuration.
One is optimize to the media folder.

Does Linux have: chflags -R uchange ? BSD does.

Afraid linux does not have chflags. It does have chattr with is similar. What was your idea?

Might I be of assistance here?

  1. Running PMS as user plex
  2. Your username owning the media
  3. Setting directory to 755 and files to 644
  4. All media will be seen and readable by PMS.
  5. Linux won’t let anything be deleted by user plex regardless what it thinks it can do.

Thanks Chuck. I’ve gone ahead and locked down the perms like you mentioned and it was what I did in the past. I still don’t know why Plex wouldn’t recognize new media unless it had write access sometime middle of last year. I was pulling my hair out doing the Plex Dance and anything else I could think of to get it to recognize the new media. Only by giving it write access did it see the new media. I saw that someone else had that problem as well, though don’t ask me to go find that thread.

I’ve had no issues with this setup.
Like I said there are thing that can’t be done but that’s ok for now.

But the fact that there is no way a Plex user including admin could delete media is great.

Wish they would fix Plex and make an Admin account that is just that.

I guess I should have said thank you to both you and Chuck. Yea, I used to run that configuration just like you had said for years. But then I hit that weird bug. Everything seems to be working fine now though. So I’m pleased that the Plex user cannot do anything to the media. Even though I have ZFS snapshots and I could rollback if necessary. Still, you won’t ever want something like that to happen.

I deliberately setup Plex to run as its own, unprivileged, user account for precisely the reason requested: It cannot do anything unless expressly granted - which includes changing media.

If a customization was performed to change the default user then the fault is not PMS but the customization.

The only thing that should require write is dvr recordings, AFAIR.

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