Some of the created directories have no permissions

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
tbyte007
Newbie
Newbie
Posts: 4
Joined: Thu Jan 17, 2019 12:11 pm

Some of the created directories have no permissions

Post by tbyte007 »

I'm trying to install Viber on FreeBSD and it creates temporary dirs with permissions like this:
d--------- 2 tbyte tbyte 512 Jan 17 18:53 {144a144e-eecc-4102-bd8b-778664ebf53a}
d--------- 2 tbyte tbyte 512 Jan 17 18:54 {acc83058-83b0-41e2-b372-266672a1af16}
And of course after that it can't access them so the installation process fails. What can I do about it and can i somehow force the umask of every created file / directory ?

Regards
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Some of the created directories have no permissions

Post by Bob Wya »

@tbyte007,

Could you post a Wine terminal log with the following debug channel enabled:

Code: Select all

export WINEDEBUG=+file
wine ... >~/wine_file_log.txt 2>&1
See: WineHQ FAQ: 10.1.1 How can I get a debugging log (a.k.a. terminal output)?

Please use the forum Code tags:

Code: Select all

...
if posting this log inline.

Thanks
Bob
tbyte007
Newbie
Newbie
Posts: 4
Joined: Thu Jan 17, 2019 12:11 pm

Re: Some of the created directories have no permissions

Post by tbyte007 »

@Bob Wya Sorry for replaying that late - i didn't have access to the laptop and the VirtualBox installation did not turn out well :)

Here is the link to google file (it exceeds the max file size for pastebin)

https://drive.google.com/open?id=1i9q7k ... 1TWJpiS4Dg
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Some of the created directories have no permissions

Post by Bob Wya »

@tbyte007

Is this one of the full paths:

Code: Select all

0031:trace:file:CreateDirectoryW L"C:\\users\\tbyte\\Local Settings\\Application Data\\Package Cache\\{144a144e-eecc-4102-bd8b-778664ebf53a}\\"
of the 2 temporary directories you listed?

If so CreateDirectoryW() should inherit permissions from the parent directory:

Code: Select all

L"C:\\users\\tbyte\\Local Settings\\Application Data\\Package Cache"
- so you'd want to check this out...

From the MSDN: CreateDirectoryW function:
If lpSecurityAttributes is NULL, the directory gets a default security descriptor. The ACLs in the default security descriptor for a directory are inherited from its parent directory.
Also... what filesystem is the WINEPREFIX setup on?

Thanks
Bob
tbyte007
Newbie
Newbie
Posts: 4
Joined: Thu Jan 17, 2019 12:11 pm

Re: Some of the created directories have no permissions

Post by tbyte007 »

Bob Wya wrote:@tbyte007

Is this one of the full paths:

Code: Select all

0031:trace:file:CreateDirectoryW L"C:\\users\\tbyte\\Local Settings\\Application Data\\Package Cache\\{144a144e-eecc-4102-bd8b-778664ebf53a}\\"
of the 2 temporary directories you listed?
yes it is :

Code: Select all

$:> ls -l ~/.wine/dosdevices/c:/users/tbyte/Local\ Settings/Application\ Data/Package\ Cache
total 8
d---------  2 tbyte  tbyte  512 Jan 17 18:53 {144a144e-eecc-4102-bd8b-778664ebf53a}
d---------  2 tbyte  tbyte  512 Jan 17 18:54 {acc83058-83b0-41e2-b372-266672a1af16}
If so CreateDirectoryW() should inherit permissions from the parent directory:

Code: Select all

L"C:\\users\\tbyte\\Local Settings\\Application Data\\Package Cache"
- so you'd want to check this out...

From the MSDN: CreateDirectoryW function:
If lpSecurityAttributes is NULL, the directory gets a default security descriptor. The ACLs in the default security descriptor for a directory are inherited from its parent directory.
Yes but the permissions of the parent dir are different:

Code: Select all

$:> ls -l ~/.wine/dosdevices/c:/users/tbyte/Local\ Settings/Application\ Data
total 8
drwxr-xr-x  2 tbyte  tbyte  512 Jan 17 18:38 Microsoft
drwxr-xr-x  4 tbyte  tbyte  512 Jan 17 18:54 Package Cache
Also... what filesystem is the WINEPREFIX setup on?

Thanks
Bob
The file system is UFS(v2)

Code: Select all

/dev/ada0s3d on /usr (ufs, local, journaled soft-updates)
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Some of the created directories have no permissions

Post by Bob Wya »

tbyte007 wrote:...
The file system is UFS(v2)

Code: Select all

/dev/ada0s3d on /usr (ufs, local, journaled soft-updates)
Surely that mount-point doesn't cover your WINEPREFIX?

Code: Select all

/home/tbyte/.wine
Surely that WINEPREFIX path would be under something like (one of):

Code: Select all

/
/home
I can't see a point, in your log, when the Windows package subdirectory:

Code: Select all

C:\users\tbyte\Local Settings\Application Data\Package Cache\{144a144e-eecc-4102-bd8b-778664ebf53a}
is created... So what happens if you change the permission of these directories manually and re-run the Viber installer?
The re-run should use the already cached data.

I'd also suggest filing a Wine bug report, with:

Code: Select all

export WINEDEBUG=+timestamp,+tid,+file,+ntdll
wine start 'Z:\home\tbyte\Downloads\ViberSetup.exe' >~/wine_file_ntdll_log.txt 2>&1
I am not sure what other Wine debug channels might be useful at this point...
ntdll will be a bit "noisy", but does cover some file handling functions.

Bob
tbyte007
Newbie
Newbie
Posts: 4
Joined: Thu Jan 17, 2019 12:11 pm

Re: Some of the created directories have no permissions

Post by tbyte007 »

Bob Wya wrote:
tbyte007 wrote:...
The file system is UFS(v2)

Code: Select all

/dev/ada0s3d on /usr (ufs, local, journaled soft-updates)
Surely that mount-point doesn't cover your WINEPREFIX?

Code: Select all

/home/tbyte/.wine
Surely that WINEPREFIX path would be under something like (one of):

Code: Select all

/
/home
/home is soft link to /usr/home
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Some of the created directories have no permissions

Post by Bob Wya »

tbyte007 wrote:...

/home is soft link to /usr/home
Ah right, sure.

Bob
sebunger
Level 1
Level 1
Posts: 5
Joined: Fri Aug 16, 2019 7:07 pm

Re: Some of the created directories have no permissions

Post by sebunger »

Hi, has there been any progress on this? I'm running into the same issue.

My system is Ubuntu 18.04 with wine-stable from winehq. The program I am trying to install is python 3.7.4 (I'm trying to install 32bit, but the behaviour appears to be the same for 64bit).

I use these commands to reproduce:
rm -rf WinPy
export WINEPREFIX="$(pwd)/WinPy"
export WINEARCH=win32
export WINEDLLOVERRIDES="mscoree,mshtml="
wine ./python-3.7.4.exe /passive /log c:/p.log TargetDir=C:/python InstallAllUsers=1 Include_doc=0 Include_debug=0 Include_dev=0 Include_exe=1 Include_launcher=0 Include_lib=1 Include_pip=1 Include_symbols=0 Include_tcltk=0 Include_test=0 Include_tools=0

The installer fails rather quickly. The log file does not reveal anything interesting (to me), but
find WinPy/drive_c -iname \*python\*
does:
find: ‘WinPy/drive_c/users/seb/Local Settings/Application Data/Package Cache/{b66087e3-469e-4725-8b9b-f0981244afea}’: Permission denied

Listing the parent directory gives
d--------- 2 seb users 4096 Aug 17 12:12 {b66087e3-469e-4725-8b9b-f0981244afea}/

My home is on an ext4.

If I put the entire drive_c directory on a vfat before running wine, then the installation proceeds normally.

I have tried pre-creating the directory with no change in behaviour. I have even tried pre-creating it and preventing deletion of it by putting a non-empty non-writable .dummy directory inside it. After the installation failed, the .dummy directory is still there proving the {...} directory was not deleted but its permissions have gone back to 0000.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Some of the created directories have no permissions

Post by Bob Wya »

@sebunger

Please use the forum Code tags to delimit terminal commands and output:

Code: Select all

...
Surely this should be obvious, from the previous posts in this forum thread.

Also please state what working directory you are using, before the command block starting with:

Code: Select all

rm -rf WinPy
...
Could you also supply the mount options for your ext4 partition, with:

Code: Select all

grep '/home/' /proc/mounts
Replacing /home - if necessary - with where ever you are trying to create the python WINEPREFIX.

Finally a Wine terminal log, with strace, would be very useful:

Code: Select all

strace wine python-3.7.4.exe /passive /log c:/p.log TargetDir=C:/python InstallAllUsers=1 Include_doc=0 Include_debug=0 Include_dev=0 Include_exe=1 Include_launcher=0 Include_lib=1 Include_pip=1 Include_symbols=0 Include_tcltk=0 Include_test=0 Include_tools=0 &>/home/wine-4.0.1-strace_python_log.txt
Which should store the terminal log in the file: wine-4.0.1-strace_python_log.txt ; in your Linux user's HOME directory.

In the meantime I'll take a look at the issue.

Bob
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Some of the created directories have no permissions

Post by Bob Wya »

@sebunger

I got bogged down doing some testing of Python 3.7.4 with Wine 4.0.2-rc1 :shock:
I can replicate your issue - but I was unable to determine the cause of the problem.
It appears to be the same issue as the Op.

Python 3.7.4 will install in a 32-bit WINEPREFIX, when I tested with Wine 3.14
I was able to launch the Python interpreter and do a simple "Hello World" print operation.

FYI Wine Stable serves little purpose (IMHO) - except to support Windows applications that already work under Wine (and to avoid regressions).

I've added a test for this Python version on the WineHQ AppDB: WineHQ AppDB: Python 3.7.4

Bob
sebunger
Level 1
Level 1
Posts: 5
Joined: Fri Aug 16, 2019 7:07 pm

Re: Some of the created directories have no permissions

Post by sebunger »

Sorry for not using the correct tags.

To answer your questions:
The directory I started in is under my home directory but not under /home/seb/Private.

The home mount options are:

Code: Select all

seb@eragon:~[0]$ grep '/home' /proc/mounts
/dev/mapper/vg0-home /home ext4 rw,relatime,discard,errors=remount-ro,data=ordered 0 0
/home/seb/.Private /home/seb/Private ecryptfs rw,nosuid,nodev,relatime,ecryptfs_fnek_sig=xxxx,ecryptfs_sig=xxxx,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs 0 0
For completeness sake, here are the commands I use when testing on vfat which works:

Code: Select all

sudo umount WinPy/drive_c ||:
rm -rf WinPy drive_c.img
mkdir -p WinPy/drive_c
truncate -s 512M drive_c.img
mkfs.vfat drive_c.img
sudo mount drive_c.img WinPy/drive_c -ouid=${USER}
wine ./python-3.7.4.exe /passive /log c:/p.log TargetDir=C:/python InstallAllUsers=1 Include_doc=0 Include_debug=0 Include_dev=0 Include_exe=1 Include_launcher=0 Include_lib=1 Include_pip=1 Include_symbols=0 Include_tcltk=0 Include_test=0 Include_tools=0
The umount at the start is to make it repeatable.

I have attached two strace logs, one from running on vfat (*-good) and one from running on ext4 (*-bad)

Hope this helps (and that this post conforms better to the rules).
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Some of the created directories have no permissions

Post by Bob Wya »

@sebunger

I will file a bug report for this issue - since I've taken on maintaining the WineHQ AppDB pages for Python...
That won't happen till later next week. TBH I don't prioritise issues with winehq-stable , that aren't regressions.

Just update Wine to development release - winehq-devel-4.14 - as I suggested, in my previous post.
Python 3.7.4 works OOTB with that Wine version.

Bob
sebunger
Level 1
Level 1
Posts: 5
Joined: Fri Aug 16, 2019 7:07 pm

Re: Some of the created directories have no permissions

Post by sebunger »

Hi Bob,

I tried wine-devel but it is not installable due to it depending on libfaudio0 which is not available from the archives.

Cheers,
Seb
sebunger
Level 1
Level 1
Posts: 5
Joined: Fri Aug 16, 2019 7:07 pm

Re: Some of the created directories have no permissions

Post by sebunger »

Ok, after some digging I found some copies of libfaudio0 and got wine-devel to install. I can confirm that installing python-3.7.4 works for that (4.14).

Thanks for all your help.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Some of the created directories have no permissions

Post by Bob Wya »

sebunger wrote:Ok, after some digging I found some copies of libfaudio0 and got wine-devel to install. I can confirm that installing python-3.7.4 works for that (4.14).

Thanks for all your help.
I wouldn't say much digging was required - given the almost weekly forum question about the installation of faudio on Ubuntu! :lol:

Anyway, I'm glad you've got it working now! 8)
Bob
Locked