File permission errors in newer versions

English support for the software AllDup
Post Reply
alldupper
Posts: 8
Joined: 26 Feb 2019, 02:25

File permission errors in newer versions

Post by alldupper »

Hi Michael,

Long time AllDup user here. Thank you for this wonderful piece of software!

I have used AllDup to slim down Windows system partitions by hardlinking duplicate system files regularly for many years. I would always do his on an offline Windows installation, booting form another partition/system. All through AllDup version 4.2, I never had any issues with replacing system files with hardlinks on an offline Windows installation.

Recently, I was unable to complete this routine task (for me, fwiw) using the latest version, 4.4.34, due to getting an appalling number of file permission errors. The latest version refuses to either delete or move to Recycle Bin any file I do not specifically have the appropriate permission for. Even though I run it elevated, as administrator, many system files are still untouchable (usually owned by SYSTEM or TRUSTEDINSTALLER).

There was a very fundamental change between versions 4.2 and 4.4.34 in how ACLs are treated. 4.2. just glossed over missing permissions and executed whatever I told it to do. 4.4.34 is picky, and respects file permissions strictly.

From my point of view, this is a regression - but I can see how, from a general aspect, it could rather be a fix of an earlier omission. Unfortunately, I can not find any trace of this change in the version history, thus have no idea if this change is even intentional at all.

Michael, would you mind, please, shedding some light on this issue?

Thanks,
George
Administrator
Site Admin
Posts: 4046
Joined: 04 Oct 2004, 18:38
Location: Thailand
Contact:

Re: File permission errors in newer versions

Post by Administrator »

Did you run a test with version 4.2 against the same system files to proof this?
alldupper
Posts: 8
Joined: 26 Feb 2019, 02:25

Re: File permission errors in newer versions

Post by alldupper »

I was unable to get the job done with v. 4.4.34 after hours of fiddling, thus went back to v. 4.2 and completed it in 10 seconds.
Administrator
Site Admin
Posts: 4046
Joined: 04 Oct 2004, 18:38
Location: Thailand
Contact:

Re: File permission errors in newer versions

Post by Administrator »

First i have to reproduce this "problem" and after we will see what we can do.

some more questions:

1. Under what windows version do you use AllDup?
2. What was the version of the offline Windows installation?
3. Can you delete files owned by SYSTEM or TRUSTEDINSTALLER on the windows installation were you running AllDup with v4.2 and v4.4.34?
alldupper
Posts: 8
Joined: 26 Feb 2019, 02:25

Re: File permission errors in newer versions

Post by alldupper »

1 - Windows 7 x64
2 - same, Windows 7 x64
3 - I can delete any system file, regardless of ownership and without appropriate permissions using AllDup 4.2
I can not delete any system file without appropriate permissions using AllDup 4.4.34
alldupper
Posts: 8
Joined: 26 Feb 2019, 02:25

Re: File permission errors in newer versions

Post by alldupper »

Basically, I replace all duplicate files larger than 500KB with hardlinks on offline Windows installations, with a few manual exceptions (e.g. Avast anti-virus files). This usually frees up 4-5GB of drive space on a previously untreated Windows 7 partition.

Trying to do this with AllDup 4.4.34 was both annoying due to all the error messages - never got one with earlier versions in many years -, but most importantly, it resulted in data loss, unfortunately. I am sorry for failing to mention this at first.

I was shocked to realize that AllDup 4.4.34 first deleted the affected files, and only later attempted to create the hardlinks for them, which then failed. Thus I was left with a broken Windows 7 installation with missing system files.

Of course, I was cautious, I had error messages pop up, and I stopped the whole process after realizing something was wrong. Went back to the log, and copied those deleted files back to the system. But they were definitely missing.

I also tried running AllDup 4.4.34 not as administrator, but as the SYSTEM user (using Sysinternals psexec64.exe). This did help with a few files, but I kept getting error messages for others. I could have tried running as other users too, TRUSTEDINSTALLER included, but decided to rather try with AllDup 4.2 which did the job in a flash, without issues.

I am attaching the log files from this failed process. There are several, as I went back to the start after copying back the deleted files, and started anew with empty log files, a few times. The error messages in the first file say "#5 - access denied".

Interestingly, running elevated as administrator, the error message was on trying to create the hardlinks. When running as SYSTEM, it was on trying to delete files rather. This may have simply mirrored the respective available permissions. I vaguely remember it did in the first cases, but did not investigate further.

In any case, I reckon the file deletion logic needs to be improved to avoid the potential for data loss. Not sure how I would go about it, but probably first renaming the file to delete with some guaranteed unique prefix, and only deleting it once the hardlink replacing it is successfully created, could be an easy solution.
Attachments
logs.7z
(3.96 KiB) Downloaded 475 times
alldupper
Posts: 8
Joined: 26 Feb 2019, 02:25

Re: File permission errors in newer versions

Post by alldupper »

On a related note, I am fully aware of your policy of not making earlier versions of AllDup available, to avoid having to discuss them. And I can fully sympathize with it.

However, in this case, it needs to be said, that it was definitely very unhelpful for me in trying to focus in on the version of the program in which this behaviour fundamentally changed. It is possible to track down quite a few earlier versions out there, but that is very hit and miss. So I still do not know which version it was.

Sorry for the rant.
Post Reply