From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17842 invoked by alias); 29 May 2017 20:05:06 -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 17833 invoked by uid 89); 29 May 2017 20:05:05 -0000 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 Received: from forward5h.cmail.yandex.net (HELO forward5h.cmail.yandex.net) (87.250.230.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 May 2017 20:05:04 +0000 Received: from smtp1h.mail.yandex.net (smtp1h.mail.yandex.net [IPv6:2a02:6b8:0:f05::115]) by forward5h.cmail.yandex.net (Yandex) with ESMTP id F19EA20CAC; Mon, 29 May 2017 23:05:04 +0300 (MSK) Received: from smtp1h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1h.mail.yandex.net (Yandex) with ESMTP id D38AD8C0E08; Mon, 29 May 2017 23:05:02 +0300 (MSK) Received: by smtp1h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id avVHPC35d6-51DaWTuo; Mon, 29 May 2017 23:05:01 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Authentication-Results: smtp1h.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Mon, 29 May 2017 19:53:46 -0000 Date: Mon, 29 May 2017 20:22:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <705418614.20170529225346@yandex.ru> To: David Dyer-Bennet , cygwin@cygwin.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@dd-b.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00485.txt.bz2 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@DDB4 /cygdrive/p > $ ls -l foobar > ----r--r-- 1 Unknown+User Unix_Group+1001 0 May 28 17:27 foobar > David Dyer-Bennet@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