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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=gG+Aq8FFvbUdeCjO 9YYxS5+WCxnSZSZwRl2WcpAvEMroadrrkZ9RKMlsBEZC1xRhMmqJgyWSg2NvIR5t DSluFGsIT5LcW6Wd4j0a7ahjG64vW2vNz7G/KkpiwHWDv3zDJ9TLdgX1u06sLF16 nUsOh5E7WALowi3SBNqASt/jZv0= 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=ioBAyKBcX8BRRGBS8G7nni O3K54=; b=h0JBfRgv+I1hAA6mGWjK1ESkam+L3Y2YNKN475V+S1oE3Qd4+ui4JF 7YeoDNeJMiFcx7w1R3zUcnRvZNtTKdjAxdcc+AAqdwnHa/lrI2CEbs71x295+PA3 420g+TarlvjhmlURGVzEegpn+9zleChVJXv/4g1xRXbLcdu4OEuWA= 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=-5.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:D*yandex.ru, H*M:yandex, HX-Priority:Normal, H*UA:Bat! X-HELO: forward5h.cmail.yandex.net Authentication-Results: smtp1h.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0 Date: Mon, 29 May 2017 22:53:46 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <705418614.20170529225346@yandex.ru> To: David Dyer-Bennet , cygwin AT cygwin DOT com Subject: Re: Accessing SMB share as wrong user? In-Reply-To: <7f4eb950-de06-2981-c9b4-fd345c11ffb3@dd-b.net> References: <7f4eb950-de06-2981-c9b4-fd345c11ffb3 AT dd-b DOT net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Greetings, David Dyer-Bennet! > All my files are on drive P: in Windows, which is an SMB share > equivalent to \\fsfs\ddb\Documents. Everything works fine in windows > apps, and I see what I expect in Explorer, including when I go down to > security properties and look in detail. > However, Cygwin has trouble with this lately (I can't trace exactly when > it started happening; not weeks, maybe a year, but I've been running > essentially this way since 2006 and most of the time things were fine). > Cygwin appears to be accessing the share as some kind of unknown user, > rather than as the proper user configured in Windows for that share > (which is FSFS\ddb). > In Cygwin "id" shows > $ id > uid=197608(David Dyer-Bennet) gid=197121(None) > groups=197121(None), > 114(Local account and member of Administrators group), > 544(Administrators), You're running Cygwin with elevated privileges. > 545(Users),4(INTERACTIVE),66049(CONSOLE > LOGON),11(Authenticated Users),15(This Organization),113(Local > account),66048(LOCAL),262154(NTLM Authentication),405504(High Mandatory > Level) > but if I create a file it gets created owned by "Unknown+User": > $ touch foobar > David Dyer-Bennet AT DDB4 /cygdrive/p > $ ls -l foobar > ----r--r-- 1 Unknown+User Unix_Group+1001 0 May 28 17:27 foobar > David Dyer-Bennet AT DDB4 /cygdrive/p > $ getfacl foobar > # file: foobar > # owner: Unknown+User > # group: Unix_Group+1001 Your share is located on Samba server. > user::--- > group::r-- > other:r-- > And then of course I can't access it: > $ echo things >> foobar > -bash: foobar: Permission denied See Cygwin manual about setting up your network identity. Read around nsswitch.conf and implications of its different settings. > I haven't that I've noticed done anything to change what user I run as; > $USER is "David Dyer-Bennet" (the Windows username I'm in under), and > /etc/passwd has default output from mkpasswd, Ditch /etc/passwd unless you absolutely require it. > including the user "David > Dyer-Bennet" with the UID 197608 (same is ID shows at the command line). > At least I can count on people here not answering "just ditch > Cygwin"...right? And please leave ramblings outside the list. This was absolutely uncalled for. -- With best regards, Andrey Repin Monday, May 29, 2017 22:49:56 Sorry for my terrible english... -- 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