https://bugs.winehq.org/show_bug.cgi?id=46530
Bug ID: 46530 Summary: WinRAR cannot enter archives which are not owned by the user Product: Wine Version: 4.0 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: aros@gmx.com Distribution: ---
Steps to reproduce:
1) Have an archive (e.g. test.rar) owned by the root user 2) Enter it 3) Click "Info" 4) Close the dialog 5) Leave the archive 6) Try to enter it again
Now you'll get "Cannot open test.rar: access denied".
This is 100% reproducible.
https://bugs.winehq.org/show_bug.cgi?id=46530
Artem S. Tashkinov aros@gmx.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://rarlab.com/rar/wrar | |561.exe Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=46530
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- What exactly are your permissions?
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #2 from Artem S. Tashkinov aros@gmx.com --- (In reply to Fabian Maurer from comment #1)
What exactly are your permissions?
This bug is reproducible in 10 seconds. Why are you asking?
Also, have you read the bug description? WinRAR _can_ perfectly enter an archive once you start the application but then all _the subsequent open attempts fail_.
Permissions are absolutely standard: 664/644.
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #3 from Fabian Maurer dark.shadow4@web.de --- I'm asking because I can't reproduce: 1) Put random rar archive into c:\ 2) run "sudo chown root:users x.rar" 3) run "sudo chmod 644 x.rar" 4) Run "WinRAR.exe" 5) Doubleclick "x.rar" to open it 6) Click "Info" 7) Click "Ok" to close dialog" 8) Click "Up one level" to leave archive 8) Doubleclick "x.rar" to open it again
Am I doing something wrong here?
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #4 from Artem S. Tashkinov aros@gmx.com --- (In reply to Fabian Maurer from comment #3)
I'm asking because I can't reproduce:
- Put random rar archive into c:\
- run "sudo chown root:users x.rar"
- run "sudo chmod 644 x.rar"
- Run "WinRAR.exe"
- Doubleclick "x.rar" to open it
- Click "Info"
- Click "Ok" to close dialog"
- Click "Up one level" to leave archive
- Doubleclick "x.rar" to open it again
Am I doing something wrong here?
Please try
2) sudo chown root:root x.rar
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #5 from Fabian Maurer dark.shadow4@web.de --- Sorry, still not able to reproduce. Maybe it depends on the rar file itself? Can you attach a file where the error occurs? Also, does the same issue occur when the rar file is owned by root, but is located inside .wine/drive_c (which is not owned by root)? That would be interesting to test.
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #6 from Artem S. Tashkinov aros@gmx.com --- Created attachment 63389 --> https://bugs.winehq.org/attachment.cgi?id=63389 test.tar
(In reply to Fabian Maurer from comment #5)
Sorry, still not able to reproduce. Maybe it depends on the rar file itself? Can you attach a file where the error occurs? Also, does the same issue occur when the rar file is owned by root, but is located inside .wine/drive_c (which is not owned by root)? That would be interesting to test.
I'm testing in /tmp (owned by root) and other root owned paths.
The RAR file itself doesn't matter. An empty one will work as well - the issue is with Wine, not with WinRAR.
I'm attaching a tar file. Please untar it under root/sudo - the issue will be immediately reproducible.
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #7 from Fabian Maurer dark.shadow4@web.de --- Tested in in /tmp, copied and unpacked with "sudo", but still can't reproduce.
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #8 from Artem S. Tashkinov aros@gmx.com --- (In reply to Fabian Maurer from comment #7)
Tested in in /tmp, copied and unpacked with "sudo", but still can't reproduce.
Maybe you're running a different Linux distro though I'm not sure how this might affect the issue. This is reproducible in Fedora 29 and CentOS 6.9.
I'm running quite a vanilla Fedora 29 installation and Wine-4.0 i686 compiled from the official sources and installed into /opt/wine.
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #9 from Artem S. Tashkinov aros@gmx.com --- Actually in my case it doesn't even matter where this root owned rar file is located. I cannot open it from my user directory as well with the same error message. I've sent a video clip to your email so that you can see the issue.
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #10 from Artem S. Tashkinov aros@gmx.com --- Created attachment 63393 --> https://bugs.winehq.org/attachment.cgi?id=63393 WINEDEBUG=+relay wine WinRAR.exe
Here's a +relay debug log which includes the error.
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #11 from Fabian Maurer dark.shadow4@web.de --- I'm testing on Arch Linux. And when you change the permissions to YOURNAME:users it work again?
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #12 from Artem S. Tashkinov aros@gmx.com --- (In reply to Fabian Maurer from comment #11)
I'm testing on Arch Linux. And when you change the permissions to YOURNAME:users it work again?
There's no "users" group in Fedora but when I change group ownership to "audio" (which I'm a user of) I still can reproduce the issue but _only_ if file mode is 644. If file mode is 664 I can read the file.
I've sent you the entire +all log and unless I'm misreading it, Wine does something wrong here as it tries to create this very file when you're entering it.
For some reasons on Fedora/CentOS wine needs _write_ permissions to a file in order to be able to open it. This doesn't seem right.
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #13 from Fabian Maurer dark.shadow4@web.de ---
I've sent you the entire +all log and unless I'm misreading it, Wine does something wrong here as it tries to create this very file when you're entering it.
Wine tries to crate the file? Where'd you get that information from?
0009:Call KERNEL32.CreateFileW(0055fa56 L"Z:\tmp\test\empty.rar",80000000,00000001,00000000,00000003,08000000,00000000) ret=0046bcf0 0009:Ret KERNEL32.CreateFileW() retval=0000007c ret=0046bcf0 0009:Call KERNEL32.CreateFileW(0031bb00 L"Z:\tmp\test\empty.rar",c0000000,00000001,00000000,00000003,08000000,00000000) ret=0046bcf0 0009:Ret KERNEL32.CreateFileW() retval=ffffffff ret=0046bcf0
For some reason the application asks for (GENERIC_READ | GENERIC_WRITE) in the second call, and this obviously fails. Don't ask me why it does that though, as it doesn't happen for me.
Just to make sure, you did run inside a clean WINEPREFIX with a fresh install of WinRAR?
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #14 from Artem S. Tashkinov aros@gmx.com --- (In reply to Fabian Maurer from comment #13)
I've sent you the entire +all log and unless I'm misreading it, Wine does something wrong here as it tries to create this very file when you're entering it.
Wine tries to crate the file? Where'd you get that information from?
0009:Call KERNEL32.CreateFileW(0055fa56 L"Z:\tmp\test\empty.rar",80000000,00000001,00000000,00000003,08000000,00000000) ret=0046bcf0 0009:Ret KERNEL32.CreateFileW() retval=0000007c ret=0046bcf0 0009:Call KERNEL32.CreateFileW(0031bb00 L"Z:\tmp\test\empty.rar",c0000000,00000001,00000000,00000003,08000000,00000000) ret=0046bcf0 0009:Ret KERNEL32.CreateFileW() retval=ffffffff ret=0046bcf0
Yep, that was it.
For some reason the application asks for (GENERIC_READ | GENERIC_WRITE) in the second call, and this obviously fails. Don't ask me why it does that though, as it doesn't happen for me.
Just to make sure, you did run inside a clean WINEPREFIX with a fresh install of WinRAR?
I've just retested this in a new wine prefix and I can no longer reproduce it which leaves me completely befuddled. Are you OK if I privately send you my ~/.wine directory to figure out what's going on or we just close this bug report as invalid?
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #15 from Fabian Maurer dark.shadow4@web.de --- I'm curious, so go ahead. By guess would be a configuration difference, but we'll see.
https://bugs.winehq.org/show_bug.cgi?id=46530
--- Comment #16 from Artem S. Tashkinov aros@gmx.com --- Created attachment 63396 --> https://bugs.winehq.org/attachment.cgi?id=63396 HKCU\Software\WinRAR
OK, I've found the culprit: it's a setting in my HKCU\Software\WinRAR registry path but I'm still confused what's going on. It might be a bug in the application itself.
If you import this reg file you can repro the bug immediately.
https://bugs.winehq.org/show_bug.cgi?id=46530
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED
--- Comment #17 from Fabian Maurer dark.shadow4@web.de --- Yes, this indeed causes the issue. It happens the same way on windows. Marking INVALID since it's a problem with the program itself.
https://bugs.winehq.org/show_bug.cgi?id=46530
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|WinRAR cannot enter |WinRAR cannot enter |archives which are not |archives which don't have |owned by the user |write permission
https://bugs.winehq.org/show_bug.cgi?id=46530
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #18 from Austin English austinenglish@gmail.com --- Closing.