mktemp() fails on Wine 1.9.3 + Cygwin 2.5.0-0.2

John Hood cgull@glup.org
Sat Feb 13 20:35:00 GMT 2016


Hi all,

I installed wine-staging (i386) 1.9.3 and Cygwin (i386) on my Ubuntu 
15.10 laptop in hopes of being able to maintain Cygwin compatibility of 
some software without having to actually use Windows.  I've seen several 
difficulties, but the most serious one was that gcc would fail with 
various errors relating to temporary files.  I was able to reduce it to 
a very simple test case:

echo hi > $(mktemp)

On a fresh Cygwin 2.3.1-1 install, this works, on a separate fresh 
Cygwin 2.5.0-0.2 install, this fails with

bash: $(mktemp): Permission denied

Permissions and ACLs on /tmp and the created temp files look OK on 2.3.1 
but broken on 2.5.0.  See the attached typescripts.

The other problems I've had (but not fully debugged) include null 
dereferences from setup_x86.exe near completion of the install (this may 
relate to mixed usage of 2.3.0 and 2.5.1 on the same Cygwin install and 
messed-up permissions/ACLs), and (on both 2.3.0 and 2.5.1) postinstall 
scripts being unable to remove and/or write to the their temporary 
setup.log file and popping up console windows instead.

All this works fine on a real Windows install, of course.  So any of 
this could easily be Wine issues, but the first issue does suggest a 
Cygwin problem.  The obvious suspect is the POSIX ACL improvements, but 
that's just a guess.  I can help with further debug if needed.

I'd have included cygcheck output for both these installs but it hangs 
on both of them.  The installs are from the same recent download from a 
mirror, with the only difference being the cygwin package version.  The 
inlined typescripts are a mess because of escape sequences so I've 
attached them as well.

regards,

   --jh
-------------
Cygwin 2.3.1
-------------
Script started on Sat, Feb 13, 2016  2:21:06 PM
]0;~
cgull@minibit ~
$ uname -a
CYGWIN_NT-5.2-WOW minibit 2.3.1(0.291/5/3) 2015-11-14 12:42 i686 Cygwin
]0;~
cgull@minibit ~
$ echo hi > $(mktemp)
]0;~
cgull@minibit ~
$ ls -l /tmp
total 8
-rw------- 1 cgull None 3 Feb 13 14:21 tmp.5ZU8NzX5yV
]0;~
cgull@minibit ~
$ getfacl /tmp/tmp.5ZU8NzX5yV
# file: /tmp/tmp.5ZU8NzX5yV
# owner: cgull
# group: None
user::rw-
group::---
other:---

]0;~
cgull@minibit ~
$ exit

Script done on Sat, Feb 13, 2016  2:21:43 PM
Script started on Sat, Feb 13, 2016  2:23:40 PM
]0;~
cgull@minibit ~
$ ls -l /a /tmp
total 8
drwxrwxrwt+ 1 cgull None 0 Feb 13 14:21 .
drwxr-xr-x+ 1 cgull None 0 Feb 13 13:58 ..
-rw-------  1 cgull None 3 Feb 13 14:21 tmp.5ZU8NzX5yV
]0;~
cgull@minibit ~
$ getfacl /tmp
# file: /tmp
# owner: cgull
# group: None
# flags: --t
user::rwx
group::---
other:rwx
default:user::rwx
default:group::r-x
default:other:r-x

]0;~
cgull@minibit ~
$ getfacl /
# file: /
# owner: cgull
# group: None
user::rwx
group::---
other:r-x
default:user::rwx
default:group::r-x
default:other:r-x

]0;~
cgull@minibit ~
$ exit

Script done on Sat, Feb 13, 2016  2:24:05 PM
-------------
Cygwin 2.5.0
-------------
Script started on Sat, Feb 13, 2016  2:22:06 PM
]0;~
cgull@minibit ~
$ uname -a
CYGWIN_NT-5.2-WOW minibit 2.5.0(0.294/5/3) 2016-01-28 22:13 i686 Cygwin
]0;~
cgull@minibit ~
$ echo hi > $(mktemp)
bash: $(mktemp): Permission denied
]0;~
cgull@minibit ~
$ ls -la /tmp
total 0
drwx---rwt+ 1 cgull None 0 Feb 13 14:22 .
drwx---r-x+ 1 cgull None 0 Feb 13 14:11 ..
-r-x---r-x+ 1 cgull None 0 Feb 13 14:22 tmp.Vqq2SdFykx
]0;~
cgull@minibit ~
$ getfacl /tmp/tmp.Vqq2SdFykx
# file: /tmp/tmp.Vqq2SdFykx
# owner: cgull
# group: None
user::r-x
group::---
group:SYSTEM:rwx
mask:r-x
other:r-x

]0;~
cgull@minibit ~
$ getfacl /tmp
# file: /tmp
# owner: cgull
# group: None
# flags: --t
user::rwx
group::---
other:rwx
default:user::rwx
default:group::r-x
default:other:r-x

]0;~
cgull@minibit ~
$ getfacl /
# file: /
# owner: cgull
# group: None
user::rwx
group::---
other:r-x
default:user::rwx
default:group::r-x
default:other:r-x

]0;~
cgull@minibit ~
$ exit

Script done on Sat, Feb 13, 2016  2:24:14 PM

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin23.log
Type: text/x-log
Size: 1382 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160213/48e92a53/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin25.log
Type: text/x-log
Size: 1174 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160213/48e92a53/attachment-0001.bin>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list