Wrong error msg. when moving file w/o write permission

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Wrong error msg. when moving file w/o write permission

Post by *StatusQuo »

TC 7.50b4, also present in previous versions incl. 7.04a (XP SP3),
cm_RenMov, cm_MoveOnly, cm_RenameOnly and cm_RenameSingleFile:

Moving or inplace-renaming a file, which the current user has no write access to,
TC shows an error message, telling that the target file can not be written - although the source file is the one with the missing write permission.
IMO a "cannot delete" message for the source file would fit better here (string #55 in the language file).

Currently, moving C:\restricted\source.txt to C:\free-access\target.txt, TC says:

Code: Select all

Error: Cannot write C:\free-access\target.txt!
Please remove the write protection!
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48104
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Does the user have read rights to the file? It's sometimes difficult to determine why MoveFile fails when it returns error 5 (access denied). It can be both source or target denied.
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Addition: This only applies when moving to another dir on the same drive.
Moving to another drive correctly tells, that the source file can't be deleted.

Yes, on the source file read access is allowed, writing is not. CACLS on the file says:

Code: Select all

VORDEFINIERT\Administratoren:F
NT-AUTORITÄT\SYSTEM:F
VORDEFINIERT\Benutzer:R
Jeder:R
The move was tried with a user of the group "Benutzer" (User).

In the target dir all users have access right "Change (write)".

But I'd rate this issue not so important.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48104
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have checked it now - Windows really returns access denied (error 5) here. Sorry, I will have to leave it as it is now, TC cannot know whether the error was a source or target problem.
Author of Total Commander
https://www.ghisler.com
Post Reply