pkolaczk / fclones

Efficient Duplicate File Finder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

os error 5 caused by certain chars in path/filename

shippj opened this issue · comments

commented

Windows server 2019

fclones remove < dups.txt

I'm getting lots of this error:
fclones.exe: warn: Failed to open file [filename] for write: Access is denied. (os error 5)

I know it's not a ntfs permission issue because I can delete the files from explorer or with the del command.

It appears to happen with folder names or file names that contain dash -, tilde ~, or parenthesis ()

The filenames are getting recorded properly on the GROUP phase. The bug is in the REMOVE phase.

Windows locks files when they are open. fclones can read them but not write / delete them. This is nothing unusual.

commented

ok I tried to reproduce the problem with new files but was unable to so I guess it's not the special chars in the filenames causing the issue. When I run CMD with the same permissions as fclone, CMD is able to delete the files with the DEL command. I'm not running any antivirus or other security software, not even defender, and this is windows server 2019. I also tried mapping the drive to a fresh win10 pro VM, same problem. I have ran a "replace all child object permission entries with inheritable permission entries from this object". Can you think of anything else I can try?

commented

Problem solved!

It ended up being the stupid READ ONLY attribute! Probably because a lot of these files were copied from CD/DVD and that causes that attribute to be set.

2023-05-11 20_29_14-20130821_044858 (2016_11_12 17_24_16 UTC) MP4 Properties