Access to Download and Documents folders from Wine

Questions about Wine on macOS.
Locked
rmkk
Level 2
Level 2
Posts: 12
Joined: Tue Dec 03, 2019 5:24 am

Access to Download and Documents folders from Wine

Post by rmkk »

Dear friends,

there is something strange while accessing content of two specific folders from Wine, ~/Download and ~/Documents. The content of both directories is shown fine when Wine is executed directly from terminal window. On the other hand the same content is hidden when Wine is invoked from app bundle - thus folders seem to be empty. Other folders like ~/Music, ~/Pictures, ... were displayed fine in both ways.

The easiest way how to simulate is to run wine explorer either from terminal window or from script inside .app bundle. The results can be seen in attachments.

It probably somehow relates to Catalina security policy, because on Mojave it was OK. I tried to give full disk access to Wine but it not helped.

So i decided to ask if somebody already solved this annoying problem.

Thanks.
wine explorer executed from terminal.jpg
wine explorer executed from app.jpg
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Access to Download and Documents folders from Wine

Post by Gcenx »

SIP was hardened in macOS Catalina that’s what’s blocking access to these directories, it also blocks /Desktop.

looking at the screenshot it seems your using one of my builds and since you keep mentioning wine that doesn’t function on macOS Catalina I’ll assume wine-crossover package is being used.

Ignore the app and only use via terminal, the reason the “wine” command seems to function is due to a provided wrapper script mostly for winetricks comparability
rmkk
Level 2
Level 2
Posts: 12
Joined: Tue Dec 03, 2019 5:24 am

Re: Access to Download and Documents folders from Wine

Post by rmkk »

Ok. However I prefer to keep the launcher as APP file, because one can assign an icon to it and add it to docker, so that it looks and behaves like a native macos application. Except the problem with access to Desktop, Document and Download folders. Are you sure there is no setting or workaround to make it working ? Thanks a lot.
rmkk
Level 2
Level 2
Posts: 12
Joined: Tue Dec 03, 2019 5:24 am

Re: Access to Download and Documents folders from Wine

Post by rmkk »

Finally there is a workaround, one has to allow full disk access to /bin/sh. Then content of ~/Desktop, ~/Documents and ~/Downloads folder is visible even in Wine crossover. Thanks to @Gcenx
Screenshot at Oct 17 10-37-38.jpg
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Access to Download and Documents folders from Wine

Post by Gcenx »

rmkk wrote: Sat Oct 17, 2020 3:45 am Finally there is a workaround, one has to allow full disk access to /bin/sh. Then content of ~/Desktop, ~/Documents and ~/Downloads folder is visible even in Wine crossover. Thanks to @Gcenx
Screenshot at Oct 17 10-37-38.jpg
This isn’t something I’d recommend as now any script that use /bin/sh will inherit these permissions.
Locked