X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:subject:reply-to:references:to:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=Nxf+6WHvW/9AYKDR HeCG62R/jfb6Sf6ynjxxqnjhibx7gLCCs9grLOd60SAnJrIf9zcJXXFItYIjZHJ6 AWc1bMasvsNYsmWE08MIShPERgYf5DrXsxiDfKwYMGbRPIwcVJVd2iMTPgc4l3ot X8n8mAGTqNbZvt3oBxtnfAWflrA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:subject:reply-to:references:to:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=uYdPUKdwAt8fSKxMJmFZ4O H45bs=; b=r0we8hOSa8vUWEwgLeJv+u4et2V40bgrZi5mtBYP+lJcY5MEpuq6D3 fP+A+5RRncpsSlPSOOG1WBcCVkBWPVZcExUEjkhpjpI8TQbKLGD+hATfOsYLQN16 VgCaFN44o/V3mjIQt3S3MjqdiAyIp+1AwpwlL4a1Hot+nXPaFCE0Q= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=privilege, w32api, states, hear X-HELO: smtp-out-so.shaw.ca X-Authority-Analysis: v=2.2 cv=eK1jtDh1 c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=wGz7-fTsAAAA:8 a=G3t0qmIugT9W_7a8eWsA:9 a=QEXdDO2ut3YA:10 From: Brian Inglis Subject: Re: Windows 10 Creators Update and Symlinks Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca References: <4b5447f2-a1fe-925e-5e3d-6692347374ad AT kit DOT edu> <60bf66d9-d467-3cac-72f9-7823d1c1c32a AT teco DOT edu> To: cygwin AT cygwin DOT com Message-ID: <3e2df893-9813-2f1b-ad0b-f7e6fa5cdc19@SystematicSw.ab.ca> Date: Sun, 23 Apr 2017 09:21:06 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <60bf66d9-d467-3cac-72f9-7823d1c1c32a@teco.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfK7FGFh1OEjXBIOEXDs3KY2qpW0krY332B4KpR1pA7NyA4j6j2afJgWFWU/4xVBDvzAMNXeTjnEE8Tx/poLckJhvig8VKPmD9nHSdX8rLEDLNnzm4F6W aUR4H23lSHHK4zFAeaNj/9winDw8Kvjz+i/sbjYvZUxLUvacwdo6LUFculP54rkHjAxddu31PxSplg== X-IsSubscribed: yes On 2017-04-23 03:26, Till Riedel wrote: > Am 13.04.2017 um 0:29 schrieb Jeffrey Altman: >> When Developer mode is enabled the elevation requirement for >> symlink creation is disabled: >> https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/#DXz6icKZOkEozgYR.97 >> This was necessary for symlink creation within WSL to work. > I was really excited to hear this! > I tried to export CYGWIN="winsymlinks:nativestrict" and create > symlink without elevation and failed on cygwin 2.8.0 (checked that > "cmd /C mklink" works as expected in Windows 10 Creators Update > Developer Mode). > Any ideas if there are any extra checks that lead to "Operation not > permitted"? > Windows seemingly even allows symlinks to nonexistent files (I > somehow think there was a problem with that in the past). For me > personally this would a strong reason to switch to real symlinks. Artcile states: CreateSymbolicLink To enable the new behavior when using the CreateSymbolicLink API, there is an additional dwFlags option you will need to set: Value Meaning SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE 0x2 Specify this flag to allow creation of symbolic links when the process is not elevated So Cygwin patches are required to winsymlinks:native/strict handling in winsup/w32api/include/winbase.h (which may be owned by mingw): #define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE 0x2 and in winsup/cygwin/path.cc(symlink_native) like: /* Try to create native symlink. */ if (!CreateSymbolicLinkW (final_newpath->Buffer, final_oldpath->Buffer, #ifdef SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE | #endif (win32_oldpath.isdir () ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0))) but may need W10 build 14972 checks, and any privilege checks disabled. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- 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