From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80875 invoked by alias); 7 Sep 2018 19:28:31 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 80866 invoked by uid 89); 7 Sep 2018 19:28:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=SYSTEM, logging, Ticket, H*MI:1c69fb81 X-HELO: mail-lf1-f43.google.com Received: from mail-lf1-f43.google.com (HELO mail-lf1-f43.google.com) (209.85.167.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Sep 2018 19:28:28 +0000 Received: by mail-lf1-f43.google.com with SMTP id l26-v6so12903736lfc.8 for ; Fri, 07 Sep 2018 12:28:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:mime-version:to:from:subject:date:importance; bh=F5dTGxMO7dzVz/vOvrGU0uR41vvdgY+t3InD/jbiPY8=; b=OdPX48zMmWlgyLrZ1c6OS+QXAGWv1MaFnxeyttGgB58sXMXYyKsWoXkrnStKeGC4NS B+B9H4pxWD9d/D3E5uTSUX+ghimcvsjQ79Adzm1DUP6GCqx4HiZrlCXE97Sy8N0JoDlx jeekMWa2OKiBTq498vrwXzfCjSSjzb4wYXFkpClDk+PKkdMdO3OYXs8y8wsC/d392fQm oM2FHEsexwQvUqIOSvG2L5z/fKf7XxV00QNa/da3fqxHC9elpaLCEAJAqCY+kGH9SOAS QML85FZ3QwIVLoLK00oByirPu5Sim2fTqycTJMU0keUFD978nCV42SSHeaJImYOYqgd4 L65w== Return-Path: Received: from ?IPv6:::ffff:192.168.1.7? (88-199-122-129.tktelekom.pl. [88.199.122.129]) by smtp.gmail.com with ESMTPSA id l1-v6sm1393644lji.41.2018.09.07.12.28.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 12:28:23 -0700 (PDT) Message-ID: <5b92d157.1c69fb81.18fb3.aaac@mx.google.com> MIME-Version: 1.0 To: "cygwin@cygwin.com" From: Marcin Kielar Subject: Fish shell fails with PermissionDenied on rename file, if Cygwin home directory is a Junction. Date: Fri, 07 Sep 2018 19:28:00 -0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2018-09/txt/msg00136.txt.bz2 Hi, This report originates from a ticket created on Fish Github account here: h= ttps://github.com/fish-shell/fish-shell/issues/2590 The issue is, that for some reason, running fish shell fails with Permissio= nDenied error if the home directory is a Windows Junction. This is what I get when I run fish in my setup: marcin@BENEK /c/tmp =E2=86=92 fish fish: Unable to rename file from '/home/marcin/.config/fish/fishd.tmp.Q= vV0Fd' to '/home/marcin/.config/fish/fishd.BENEK.x86_64': Permission denied fish: Unable to rename file from '/home/marcin/.config/fish/fishd.tmp.O= s5Tmd' to '/home/marcin/.config/fish/fishd.BENEK.x86_64': Permission denied fish: Unable to rename file from '/home/marcin/.config/fish/fishd.tmp.3= Bop6u' to '/home/marcin/.config/fish/fishd.BENEK.x86_64': Permission denied I have my cygwin home directory created as a junction to a folder on anothe= r disk, which is managed by OneDrive. This is how this looks from cmd.exe s= ide: c:\tools\cygwin\home>dir Volume in drive C is SYSTEM Volume Serial Number is 1AD1-BCDF Directory of c:\tools\cygwin\home 14.04.2018 00:53 . 14.04.2018 00:53 .. 11.11.2017 23:45 marcin [d:\OneDrive\tools\CYGWIN_HOME] 0 File(s) 0 bytes 3 Dir(s) 77=C2=A0744=C2=A0492=C2=A0544 bytes free The junction was create with `mklink` command as below: mklink /J marcin d:\OneDrive\tools\CYGWIN_HOME What you can see below is an excerpt from the `strace fish > log 2>&1` comm= and. The bigger trace is available here: http://s000.tinyupload.com/index.php?fi= le_id=3D09852752977194690660 and contains the whole `strace` log up to the = point when it just starts logging identical errors. The interesting part seems to be this: 64 381028 [main] fish 2084 mount_info::conv_to_win32_path: conv_to_win3= 2_path (/home/marcin/.config/fish) 64 381092 [main] fish 2084 mount_info::cygdrive_win32_path: src '/home/= marcin/.config/fish', dst '' 73 381165 [main] fish 2084 set_flags: flags: binary (0x2) 119 381284 [main] fish 2084 mount_info::conv_to_win32_path: src_path /ho= me/marcin/.config/fish, dst C:\tools\cygwin\home\marcin\.config\fish, flags= 0x3000A, rc 0 248 381532 [main] fish 2084 symlink_info::check: 0x0 =3D NtCreateFile (\= ??\C:\tools\cygwin\home\marcin\.config\fish) 135 381667 [main] fish 2084 symlink_info::check: not a symlink 100 381767 [main] fish 2084 symlink_info::check: 0 =3D symlink.check(C:\= tools\cygwin\home\marcin\.config\fish, 0xFFFF9150) (0x3000A) 55 381822 [main] fish 2084 path_conv::check: this->path(C:\tools\cygwin= \home\marcin\.config\fish\BENEK), has_acls(1) 111 381933 [main] fish 2084 __set_errno: int rename2(const char*, const = char*, unsigned int):2135 setting errno 2 147 382080 [main] fish 2084 rename2: -1 =3D rename(/home/marcin/.config/= fish/BENEK, /home/marcin/.config/fish/fishd.BENEK.x86_64), errno 2 We have =E2=80=9Enot a symlink=E2=80=9D response, followed by a failing ren= ame call. All other Cygwin tools work correctly. I can manually rename the files usin= g `mv`. This does not seem to be ACL / access issue, or at least not for an= y other tools I use, and I use Cygwin in this setup for years. Earlier, the= junction was to a Dropbox-managed folder, now it=E2=80=99s OneDrive-manage= d one. This however seems not to make any difference, and it seems that the= Junction is the main issue. Please also have a look at the Github Ticket, perhaps you=E2=80=99ll find m= ore details in there. I=E2=80=99ll be happy to provide more information/logs/etc if required. --=20 Regards, Marcin Kielar -- 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