delorie.com/archives/browse.cgi | search |
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:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; q=dns; s=default; b=t5I0ctUYQigXhHwf | |
Nw5HkEkxt8QkGrzsnKLqVtXcH7Z2pWmsC6Ia7TXWFbtn4DfL2ncoKmVncm2WxqFz | |
VBfmAGKOUPYKzmkVkZsQMWAHJ8XXuPRsQ+vW8liBmB+lCw18RCld6I/gyxQYQyR+ | |
NJmsi4/ENd1kgSrmh/MciXwS734= | |
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:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; s=default; bh=rubsgdG3OJhz/nXgX+MpRD | |
HpOUI=; b=W2sK8VUKmUFvms8dyG7Wk9Pxn8QRyso8md5zetOpweRM78qTTGykZu | |
3+40Ev+7wiDsMxiWkbL/oV9htlrcyWDUaHfo2ZBjmnB5LpgbKsKDiYH+MfdgSSGn | |
8xvJ1xxEWnQP+fQRjA1Q5zdZf/XTKD0e4UT7Wlx9tuW9lexmUBNps= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,UNSUBSCRIBE_BODY autolearn=ham version=3.3.2 spammy=act, organization |
X-HELO: | homiemail-a56.g.dreamhost.com |
Subject: | Re: Accessing SMB share as wrong user? |
To: | cygwin AT cygwin DOT com |
References: | <7f4eb950-de06-2981-c9b4-fd345c11ffb3 AT dd-b DOT net> <e0a75a70-9835-f12e-cba2-c91cfc656946 AT dd-b DOT net> <940871db-07d8-6528-bef3-f2630a89c505 AT SystematicSw DOT ab DOT ca> |
From: | David Dyer-Bennet <dd-b AT dd-b DOT net> |
Message-ID: | <704def19-dfa4-1ebc-512e-fae23199f7a6@dd-b.net> |
Date: | Mon, 29 May 2017 13:37:12 -0500 |
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: | <940871db-07d8-6528-bef3-f2630a89c505@SystematicSw.ab.ca> |
X-IsSubscribed: | yes |
On 5/29/2017 12:45, Brian Inglis wrote: > 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 AT 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 AT DDB4 //fsfs/x0 >> $ ls -ld . >> drwxrwxr-x+ 1 Unknown+User Unix_Group+1001 0 May 29 11:55 . >> David Dyer-Bennet AT 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 AT DDB4 //fsfs/x0 >> David Dyer-Bennet AT DDB4 //fsfs/x0 >> David Dyer-Bennet AT DDB4 //fsfs/x0 >> $ echo something > foobar >> David Dyer-Bennet AT DDB4 //fsfs/x0 >> $ ls -l foobar >> ----r--r-- 1 Unknown+User Unix_Group+1001 10 May 29 12:11 foobar >> David Dyer-Bennet AT DDB4 //fsfs/x0 >> $ getfacl foobar >> # file: foobar >> # owner: Unknown+User >> # group: Unix_Group+1001 >> user::--- >> group::r-- >> other:r-- >> David Dyer-Bennet AT 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 That appears to be instructions on how to temporarily, in code, act as another user. My problem is that when I create a Bash shell, it accesses network drives as the wrong user. It may be possible for me to write a version of Bash that switches to the right (default) user using that information, but why is it *necessary*? Local drives are accessed fine. -- David Dyer-Bennet <dd-b AT dd-b DOT net> http://dd-b.net/ -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |