delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/02/07:31:27

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 2 Nov 2009 13:31:06 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Incorrect names for file owners on mapped samba drives
Message-ID: <20091102123106.GC7831@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <001b01ca5978$32cbb900$98632b00$@com> <4AEB0D7D DOT 8090006 AT cygwin DOT com> <002501ca5984$eddd7830$c9986890$@com> <4AEB29DE DOT 50407 AT cygwin DOT com> <000e01ca5b9d$ddecb0b0$99c61210$@com>
MIME-Version: 1.0
In-Reply-To: <000e01ca5b9d$ddecb0b0$99c61210$@com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Nov  2 09:21, John Daintree wrote:
> I've established that the differences in the output of -ls -l on the different drives is down to differences in acl/noacl.
>  
> $ mount
> //devt/devt on /u type smbfs (binary,notexec,noacl,posix=0,user)
> U: on /cygdrive/u type smbfs (binary,posix=0,user,noumount,auto)
> 
> ls -l on u:/tmp returns "johnd" as owner of files
> ls -l on /u/tmp returns "johnd" as owner
> ls -l on /cygdrive/u returns "????????" as owner
> 
> I suspect that the difference is that /cygdrive/u does not have "noacl". 

That's what acl/noacl is for.  See the user's guide:
http://cygwin.com/1.7/cygwin-ug-net/using.html#mount-table

With "acl" switched on, Cygwin uses what's returned by the file system
and in case of a Samba share the user and group are special SIDs
constructed from the OSes uid/gid values.

If you want nice entries in ls -l output, add the users and groups to
your local /etc/passwd and /etc/group files using mkpasswd and mkgroup
with the new -U options:

http://cygwin.com/1.7/cygwin-ug-net/using-utils.html#mkpasswd
http://cygwin.com/1.7/cygwin-ug-net/using-utils.html#mkgroup

For instance:

  $ mkpasswd -U root,corinna -S_ -L my_samba_box
  Unix User_root:unused:10000:99999:,S-1-22-1-0::
  Unix User_corinna:unused:10500:99999:,S-1-22-1-500::
  $ mkpasswd -U root,corinna -S_ -L my_samba_box >> /etc/passwd
  $ mkgroup -U root,corinna -S_ -L my_samba_box
  Unix Group_root:S-1-22-2-0:10000:
  Unix Group_vinschen:S-1-22-2-11125:21125:
  $ mkgroup -U root,corinna -S_ -L my_samba_box >> /etc/group
  $ cd //my_samba_box/my_share
  $ ls -l some_file
  -rw------- 1 UnixUser_corinna UnixGroup_vinschen 172 2009-09-22 16:27 some_file


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019