Unable to delete File - Please check your permissions

server-windows

#1

Well... nothing wrong with the permissions, of course.
Nothing has changed except an update to PMS.
I stop PMS and restart it and I can delete from the client again until the next time...

Unable to delete file - Please check your permissions...

Here they are.
about 19:40


#2

Here they are after a restart of PMS and the successful deletion of:
Doctor Who (2005) - S00E149 - The Return of Doctor Mysterio.mp4


#3

and again - 17: 25 or so…


#4

Restart PMS - Doctor Who (2005) - S10E01 - Pilot.xxx deleted normally.


#5

I have been noticing this same behavior with all versions after 1.7.2.3878. Every time a new version gets released I update and watch a few videos successfully deleting each file after watching. But if a new file gets added to the server at any point, I am no longer able to delete the files unless I restart the server. If I roll back to 1.7.2.3878 the problem completely goes away. This used to be an issue a year or so back, and has long been fixed. But now it seems to have cropped back up. Is there a new setting or “improvement” in newer versions that has caused this behavior to start happening again?


#6

Good news - bad news.
First the good news. Your naming and folder structure is Awesome. :wink: :stuck_out_tongue:

The bad news, is I can’t help with your issue. You could try using Lock Hunter or some other utility to see if some program has that file open. Maybe Plex hasn’t closed it. Anyway here is the section of the log that shows the issue - same error as your previous log.

Jul 14, 2017 17:26:42.946 [10640] DEBUG - Request: [192.168.1.32:37616 (Subnet)] DELETE /library/metadata/24314 (14 live) TLS GZIP Signed-in Token (JuiceWSA)
Jul 14, 2017 17:26:43.992 [10640] ERROR - SHFileOperationW returned 0x20 for FO_DELETE on ‘H:\TV Vintage\Doctor Who (2005)\Season 10\Doctor Who (2005) - S10E01 - The Pilot.mp4’. Falling back to deleting file.
Jul 14, 2017 17:26:43.997 [8036] DEBUG - Completed after connection close: [192.168.1.32:37616] 400 DELETE /library/metadata/24314 (14 live) TLS GZIP 1051ms 235 bytes (pipelined: 159)


#7

Oh, I’m quite certain Plex has it opened, cause there’s nothing else in my Plexiverse that would have it open while I’m having Plex play it!

LOL!!

I restart the server (not a box reboot, mind you) and a client can delete it just fine, which kinda defeats the purpose 'cause while I’m restarting PMS I could open Windows Explorer and delete that perfectly named file…

:slight_smile:

Incidentally this started right after that last PMS upgrade, so, naturally, I’m suspicious. More good news for me is when this starts to annoy me a little more (in the next few minutes), I have enough previous versions in my data to supply Puerto Rico.

Thanks for taking a look, Jim.


#8

This has started happening to me on the plex pass version recently, as soon as I quit plex server it releases the files and lets me delete them.


#9

Yea, it’s pretty steady for me. PMS restart cures it - for a while.


#10

BTW:
Here’s a fresh set of log files that may show the failed attempt somewhere in the neighborhood of 21:30 last evening - and the successful attempt after a PMS restart.

BTW 2:
I’m not going anywhere… lol


#11

Any updates on this? I assume everyone is still having the issue?


#12

@JuiceWSA if this is a file lock issue then it would not be easy to find out what it is unless it is predictable and you can reproduce the problem - in which case, you can use SysInternals Process Monitor in advance of the issue arising to cover the time up to the failure to move. The ProcMon capture for all events together with the logs would show what may have had the file open whilst it was to be deleted

If it is feasible to get the diagnostics, then please capture all events and save into PML all events, zip, upload on dropbox or similar service, send me link by Private Message and upload the logs that show the error


#13

@sa2000 said:
@JuiceWSA if this is a file lock issue then it would not be easy to find out what it is unless it is predictable and you can reproduce the problem - in which case, you can use SysInternals Process Monitor in advance of the issue arising to cover the time up to the failure to move. The ProcMon capture for all events together with the logs would show what may have had the file open whilst it was to be deleted

If it is feasible to get the diagnostics, then please capture all events and save into PML all events, zip, upload on dropbox or similar service, send me link by Private Message and upload the logs that show the error

Yea, I can see your lips moving, but what I’m hearing is “wbwa, mumbmmm ivid flimelva mrum frum”.

  1. I can’t predict a totally random bug, that may occur at any time after a PMS restart - 1 hour, 1 day, 2, days, etc.
  2. Eventually - when this bug’s annoyance factor becomes more widespread - other users may be more versed in whatever language that is you’re speaking and may be able to gather whatever it is you’re looking for.

#14

This is continuing to happen with the latest version 1.8.0.4109. Once I uninstalled and reinstalled version 1.7.2.3878 the issue stops.


#15

@changelin said:
This is continuing to happen with the latest version 1.8.0.4109. Once I uninstalled and reinstalled version 1.7.2.3878 the issue stops.

logs?


#16

@sa2000 said:

@changelin said:
This is continuing to happen with the latest version 1.8.0.4109. Once I uninstalled and reinstalled version 1.7.2.3878 the issue stops.

logs?

Don’t know if you saw, but I have several sets of logs above - that much I can (and did) do.


#17

@JuiceWSA said:

@sa2000 said:

@changelin said:
This is continuing to happen with the latest version 1.8.0.4109. Once I uninstalled and reinstalled version 1.7.2.3878 the issue stops.

logs?

Don’t know if you saw, but I have several sets of logs above - that much I can (and did) do.

I have seen your logs and have replied,
For @changeling I need to see the logs to confirm it is the same issue and in case there are further clues.


#18

I am facing the same exact issue. When I click on delete I get the error that this file cannot be deleted and on checking the logs I get the error:

ERROR - SHFileOperationW returned 0x20 for FO_DELETE on…

Exiting and re-running Plex doesn’t fix it. A computer restart fixes this error. I am not restarting my PC so kindly let me know what kind of tests you would like me to run, if any?

System Info:
Plex Media Server: Version 1.8.1.4139
OS: Windows 10 Pro x64

EDIT: Added system and PMS version info.


#19

@UsamaWaheed said:
I am facing the same exact issue. When I click on delete I get the error that this file cannot be deleted and on checking the logs I get the error:

ERROR - SHFileOperationW returned 0x20 for FO_DELETE on…

Exiting and re-running Plex doesn’t fix it. A computer restart fixes this error. I am not restarting my PC so kindly let me know what kind of tests you would like me to run, if any?

System Info:
Plex Media Server: Version 1.8.1.4139
OS: Windows 10 Pro x64

EDIT: Added system and PMS version info.

Error 0x20 is
16 (0x10) ERROR_CURRENT_DIRECTORY The directory cannot be removed.

What file/directory are you trying to delete ? and how ? Through the Plex Web interface?
Could you attach zip of the logs?
You could use tools such as OpenedFilesView http://www.nirsoft.net/utils/opened_files_view.html to export to excel list of all open files and see what has a lock on the path that is failing to be deleted. You could sort on the path and see what processes have locks on the file / files

Using


#20

Hi sa2000,

Thanks for the prompt reply and help. I ran the OpenedFilesView and found that the particular file that I was trying to delete via the PMS Web page was opened by another system (vmware-vmx.exe). I have multiple VMs running for different purposes and one of it was interfering. I shut off the particular VMs (Shared-Folder features in VM to be exact) and all is good.

Thanks and sorry for the trouble :smile: