From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94674 invoked by alias); 29 May 2017 17:45:36 -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 94565 invoked by uid 89); 29 May 2017 17:45:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,UNSUBSCRIBE_BODY autolearn=ham version=3.3.2 spammy=Switching, H*r:sk:smtp-ou, organization X-HELO: smtp-out-so.shaw.ca Received: from smtp-out-so.shaw.ca (HELO smtp-out-so.shaw.ca) (64.59.136.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 May 2017 17:45:24 +0000 Received: from [192.168.1.100] ([174.0.238.184]) by shaw.ca with SMTP id FOj7dgT1Syd2DFOj8d9wUf; Mon, 29 May 2017 11:45:11 -0600 X-Authority-Analysis: v=2.2 cv=F5wnTupN c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=jAVVHHRi7e8TFrhYgE0A:9 a=QEXdDO2ut3YA:10 a=OO2XiV6ZNdAA:10 a=sRI3_1zDfAgwuvI8zelB:22 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: Accessing SMB share as wrong user? To: cygwin@cygwin.com References: <7f4eb950-de06-2981-c9b4-fd345c11ffb3@dd-b.net> From: Brian Inglis Message-ID: <940871db-07d8-6528-bef3-f2630a89c505@SystematicSw.ab.ca> Date: Mon, 29 May 2017 19:18:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfG1aC3+heqqQh4zP4yQMxuHLto+gcAnierRsZPXf3zhGcuc4r8A5WyRIKfEzG96IOqZJajc81N4tJf9ctldWrt/PlNaDoZyULR2fILkfF193WgwOUOYE AZKP3uWYuUjgq2W+EyiSH8HZ+szSKrt5eiPZ5XD5ixrObX6ssh3TK1Yts510rfrbd/FTbVO6QwnTyQ== X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00480.txt.bz2 On 2017-05-29 11:16, David Dyer-Bennet wrote: > A simpler case demonstrating this; X0 is a new share (created just > for testing this) with no prior history, nothing manually set. > (Server is FreeNAS, current version). > From the beginning, when it first sees it, it shows the file owners > and groups weirdly. > And then it's able to create a file and write to it *once*, but > can't then append to it??? > David Dyer-Bennet@DDB4 //fsfs/x0 > $ id > uid=197608(David Dyer-Bennet) gid=197121(None) > groups=197121(None),197609(Ssh > Users),545(Users),4(INTERACTIVE),66049(CONSOLE LOGON),11(Authenticated > Users),15(This Organization),113(Local account),66048(LOCAL),262154(NTLM > Authentication),401408(Medium Mandatory Level) > David Dyer-Bennet@DDB4 //fsfs/x0 > $ ls -ld . > drwxrwxr-x+ 1 Unknown+User Unix_Group+1001 0 May 29 11:55 . > David Dyer-Bennet@DDB4 //fsfs/x0 > $ getfacl . > # file: . > # owner: Unknown+User > # group: Unix_Group+1001 > user::rwx > group::rwx > other:r-x > default:user::rwx > default:group::rwx > default:group:Unix_Group+1001:rwx > default:mask:rwx > default:other:r-x > David Dyer-Bennet@DDB4 //fsfs/x0 > David Dyer-Bennet@DDB4 //fsfs/x0 > David Dyer-Bennet@DDB4 //fsfs/x0 > $ echo something > foobar > David Dyer-Bennet@DDB4 //fsfs/x0 > $ ls -l foobar > ----r--r-- 1 Unknown+User Unix_Group+1001 10 May 29 12:11 foobar > David Dyer-Bennet@DDB4 //fsfs/x0 > $ getfacl foobar > # file: foobar > # owner: Unknown+User > # group: Unix_Group+1001 > user::--- > group::r-- > other:r-- > David Dyer-Bennet@DDB4 //fsfs/x0 > $ echo more >> foobar > -bash: foobar: Permission denied See Cygwin User's Guide section on Switching the user context: $ cygstart /usr/share/doc/cygwin-2.8.0/html/cygwin-ug-net/ntsec.html#ntsec-setuid-overview OR $ cygstart https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview -- 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