+Incorrect permissions when moving files in Wine

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Madars
Junior Member
Junior Member
Posts: 5
Joined: 2005-02-01, 13:23 UTC
Location: Cambridge, MA

+Incorrect permissions when moving files in Wine

Post by *Madars »

In Wine 1.6 and Wine 1.7 (but not in Wine 1.4) the Total Commander is basically unusable: after moving a file its permissions are set to 000 (i.e. even the owner cannot read/write the file).

Tested using Ubuntu 13.10, but also true for Debian testing; this holds for all recent 32-bit Total Commander versions (i.e. 7.51, 8, 8.5 and 8.5 beta). Is this a bug in Wine and is there a work-around I could use while it gets fixed?
User #178060
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Not confirmed. Wine programs cannot set the permissions and owner/group, this is done by Wine automatically.

Btw, this is usually controlled by the umask value.
Author of Total Commander
https://www.ghisler.com
Madars
Junior Member
Junior Member
Posts: 5
Joined: 2005-02-01, 13:23 UTC
Location: Cambridge, MA

Post by *Madars »

I still think there is a strange interplay between Total Commander and Wine, that is not true for other Windows programs.

In particular, if umask=022 (the default) then moving a file in Total Commander results in this behavior, while using "move" from cmd.exe (which should, in principle, do the same syscalls) does not. Similarly Wine's explorer.exe can move files without changing their permissions.

So there must be something that Total Commander does that tricks Wine into changing the permissions into incorrect ones :(
User #178060
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Total Commander uses the normal MoveFile function, nothing special!

Maybe it's due to this setting:

XPMoveMethod=
1: When moving files within a drive, the permissions of the target folder are used
2: As 1, but when moving folders, all files and subfolders in them are changed to the target permissions too
0: The permissions of the files are kept
Default: XP:1, other systems: 0

However, this tries to sets WINDOWS permissions, not Linux permissions. Try setting
XPMoveMethod=0
Author of Total Commander
https://www.ghisler.com
Madars
Junior Member
Junior Member
Posts: 5
Joined: 2005-02-01, 13:23 UTC
Location: Cambridge, MA

Post by *Madars »

Excellent! This really solves the issue -- if XPMoveMethod=0, then Wine does not try to maul the permissions. Thank you!
User #178060
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for checking! I will make XPMoveMethod=0 automatic on Linux.
Author of Total Commander
https://www.ghisler.com
Post Reply