| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 5D18B3858420 |
| DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
| s=default; t=1710176398; | |
| bh=j9+bgygV/mWF8aQdmUx6K0uf2SO/Dw0nJ8p820FV+Wk=; | |
| h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: | |
| List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | |
| From; | |
| b=qo6sn0/EeDVWH5zig3hkvxCL7fmgO/yDjvKDCwiSNp94d6VIID350CqgcQfD9om93 | |
| k3rqQ06mq9trWQ5tZWvLLCG1R2zZfbt4vpGCIekHnfO8nyg2jC2m6CvETomNkwjh/w | |
| ND8J4QwAOF66RiLfSSMHPjmau81u+9/QIQuE1U/o= | |
| X-Original-To: | cygwin AT cygwin DOT com |
| Delivered-To: | cygwin AT cygwin DOT com |
| DMARC-Filter: | OpenDMARC Filter v1.4.2 sourceware.org 69D933858D20 |
| ARC-Filter: | OpenARC Filter v1.0.0 sourceware.org 69D933858D20 |
| ARC-Seal: | i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710176349; cv=none; |
| b=Oht2JEembJkYJKlLrdOrBfOcNiuAgJm90mTdCS3eH6xXCFVsRzgSfYxJcyNysj6fE8TF6n+88FlaXX5yk9EHjsckxXFVh+PMlwsHCKAKlnqrxvasV1LxfTeZ+f0CskceX+AAFaEUn6E6BQmmTnYdtD/ijY/SVr1lCAT0o21tS84= | |
| ARC-Message-Signature: | i=1; a=rsa-sha256; d=sourceware.org; s=key; |
| t=1710176349; c=relaxed/simple; | |
| bh=5Rk11jLH6CD/T39FyIfDLDSL3shpcyYKzGYI96RO9SE=; | |
| h=Message-ID:Date:MIME-Version:Subject:To:From; | |
| b=qmNFpAOGmYum0HPDOsRHebfIQZ1blhlk6+633R+obp3QaR7fJy7IrXx6uzbxE80BlpnkhNyC/wlzvdf5atHMNQptM0OW6pivWv1w3iapuVTtp5sY2dZ+tERjKxUK4bn3bHcxkfIU92JJxdSxkDBR7HyNixatKCnRo9+DcXt+mn8= | |
| ARC-Authentication-Results: | i=1; server2.sourceware.org |
| Message-ID: | <36e07086-b975-416d-b2c1-a5bd208cb7de@SystematicSW.ab.ca> |
| Date: | Mon, 11 Mar 2024 10:59:02 -0600 |
| MIME-Version: | 1.0 |
| User-Agent: | Mozilla Thunderbird |
| Subject: | Re: Cygwin 3.5.1: unable to open output file |
| '/cygdrive/t/tmpdir/x-01564d.o': 'Operation not permitted' | |
| To: | cygwin AT cygwin DOT com |
| References: | <CAAvCNcDaoJw301_VRFJvAUqhPWp3cm8JWi3hj+XqtZq-ze8eJw AT mail DOT gmail DOT com> |
| <CALXu0Ud+T+K6w5fYt-BUhP+98fJL9V-PJbPpv7THSjbvFfxpaA AT mail DOT gmail DOT com> | |
| <CAKAoaQ=SN7RoR78-OGogQBSzFSndhysJpgR4c-+nEzkvTqZhGA AT mail DOT gmail DOT com> | |
| Organization: | Systematic Software |
| In-Reply-To: | <CAKAoaQ=SN7RoR78-OGogQBSzFSndhysJpgR4c-+nEzkvTqZhGA@mail.gmail.com> |
| X-Stat-Signature: | 13qbws1k4hhfqse6mxmojg73io3z6dme |
| X-Rspamd-Server: | rspamout03 |
| X-Spam-Status: | No, score=-2.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, |
| RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, | |
| SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, | |
| UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 | |
| X-Rspamd-Queue-Id: | 218752002C |
| X-Session-Marker: | 427269616E2E496E676C69734053797374656D6174696353572E61622E6361 |
| X-Session-ID: | U2FsdGVkX1+mD+MMJqV2XS+ZxcSD445pr5KO5DqSU/4= |
| X-HE-Tag: | 1710176345-275830 |
| X-HE-Meta: | U2FsdGVkX1+0USlmeTG19jDGwRooXqUnwS7dzvPhxTCdZWWZsvhC7nx6nSvFKut1pQdeWevYZndTH76cofEdpfY7KU46lTDMoEUIyBcIDEf76jefiExaXLoLPiv7NUQC38nTcgZ4/5k2D4ov3473gnfhKTn+Qnj3cVj3b+CQbd9bYWHs5ueVfM7UZ/lUvuAf5AdXIYa5VwTT/RFUriBvP4N4tztVRqbf+ZHqFSxePtGTplJddL6CH14jcXvl3n17Zql6H3oZMMiIYUgbHtVO6i62GkL9tGcmmkhqSKRVmAi7HnUxxixdXqA2QR0n3GrlgHiadHIo5m8O/A1eUJkDXiDJ8ALlTWESkapUTCRFM9lJL/AqccKyuLvEz8MuZxao0CpR2i1iQGDOXfKHau7/7/K3relUm4qL7Rh26bt/8QfxeVUC+g5cOR4qfXL1WkZRfD0pN63Mr1FuuBumkx075w== |
| X-Spam-Checker-Version: | SpamAssassin 3.4.6 (2021-04-09) on |
| server2.sourceware.org | |
| X-BeenThere: | cygwin AT cygwin DOT com |
| X-Mailman-Version: | 2.1.30 |
| List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
| List-Unsubscribe: | <https://cygwin.com/mailman/options/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> | |
| List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
| List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
| From: | Brian Inglis via Cygwin <cygwin AT cygwin DOT com> |
| Reply-To: | cygwin AT cygwin DOT com |
| Cc: | Brian Inglis <Brian DOT Inglis AT SystematicSW DOT ab DOT ca> |
| Errors-To: | cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com |
| Sender: | "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com> |
| X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id 42BGxxt81679528 |
On 2024-03-11 04:27, Roland Mainz via Cygwin wrote:
> On Mon, Mar 11, 2024 at 8:01 AM Cedric Blancher via Cygwin
> <cygwin AT cygwin DOT com> wrote:
>> On Fri, 8 Mar 2024 at 03:25, Dan Shelton via Cygwin <cygwin AT cygwin DOT com> wrote:
>>> I've run into a problem with clang on Cygwin 3.5.1 and 3.6. My machine
>>> does not have much disk space left, so I switched TMPDIR to the
>>> network drive. But clang then failed, like this:
>>>
>>> $ cat x.c
>>> #include <stdio.h>
>>> int main(int ac, char *av[]) { puts("hello world"); return 0 ; }
>>> $ mkdir /cygdrive/t/tmpdir
>>> $ TMPDIR=/cygdrive/t/tmpdir clang x.c
>>> error: unable to open output file '/cygdrive/t/tmpdir/x-01564d.o':
>>> 'Operation not permitted'
>>> 1 error generated.
>>>
>>> /cygdrive/t/tmpdir/ is a clean dir.
>>> /usr/bin/touch /cygdrive/t/tmpdir/dummy works without problems
>>
>> I can confirm the bug, but only for the clang version linked to
>> Cygwin. clang version of MinGW does not show that error, so this looks
>> like a Cygwin bug.
>
> I can reproduce the bug on Cygwin "CYGWIN_NT-10.0-19045
> 3.6.0-0.73.gc2310061c66a.x86_64":
> ---- snip ----
> $ cat x.c
> #include <stdio.h>
> int main(int ac, char *av[]) { puts("hello world"); return 0 ; }
>
> $ TMPDIR=/cygdrive/t/tmpdir/ strace -o clang_tmpdir_on_nfs41fs.log
> "C:\cygwin64\bin\clang-8.exe" x.c
> error: unable to open output file '/cygdrive/t/tmpdir/x-8cb6f7.o':
> 'Operation not permitted'
> 1 error generated.
> ---- snip ----
>
> Full strace log is at https://nrubsig.kpaste.net/ff6248c25 (I use the
> line numbers from that site below).
>
> It seems starting with line 2949 this goes wrong:
> ---- snip ----
> 505 5069822 [main] clang-8 40295 symlink_info::check: 0x0 =
> NtCreateFile (\??\T:\tmpdir\x-8cb6f7.o)
> 3645 5073467 [main] clang-8 40295 symlink_info::check: not a symlink
> 266 5073733 [main] clang-8 40295 symlink_info::check: 0 =
> symlink.check(T:\tmpdir\x-8cb6f7.o, 0x7FFFF96E0) (mount_flags 0x4020,
> path_flags 0x0)
> 310 5074043 [main] clang-8 40295 path_conv::check:
> this->path(T:\tmpdir\x-8cb6f7.o), has_acls(1)
> 305 5074348 [main] clang-8 40295 build_fh_pc: fh 0x800027A30, dev 000000C3
> 1441 5075789 [main] clang-8 40295 __set_errno: int
> check_access(security_descriptor&, GENERIC_MAPPING&, ACCESS_MASK, int,
> bool):600 setting errno 13
> 257 5076046 [main] clang-8 40295 check_file_access: flags 0x2, ret -1
> ---- snip ----
>
> So |build_fh_pc()| somehow fails with error 13... but I don't understand why...
>
> And then there is this weird ACL:
> ---- snip -----
> $ ls -l /cygdrive/t/tmpdir/x-8cb6f7.o
> -rw------- 1 Unix_User+197608 Unix_Group+197121 0 Mar 11 11:00
> /cygdrive/t/tmpdir/x-8cb6f7.o
> $ getfacl /cygdrive/t/tmpdir/x-8cb6f7.o
> # file: /cygdrive/t/tmpdir/x-8cb6f7.o
> # owner: Unix_User+197608
> # group: Unix_Group+197121
> user::---
> group::---
> other::---
> ---- snip ----
>
> /usr/bin/file, echo&&/&/usr/bin/cat can read/write that file
> ---- snip ----
> $ file /cygdrive/t/tmpdir/x-8cb6f7.o
> /cygdrive/t/tmpdir/x-8cb6f7.o: empty
> $ echo "foo" >>/cygdrive/t/tmpdir/x-8cb6f7.o
> $ cat /cygdrive/t/tmpdir/x-8cb6f7.o
> foo
> ---- snip ----
>
> I have no idea why clang fails in this case... I need help with this one...
For normal temp space behaviour under Cygwin, I found you have to:
chmod -c a+rwxt /cygdrive/t/tmpdir/
setfacl -m u::rwx,g::rwx,o::rwx,d:u::rwx,d:g::rwx,d:o::rwx /cygdrive/t/tmpdir/
to set the DACLs to rwx and avoid any problems.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |