Incorrect names for file owners on mapped samba drives

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Nov 2 12:31:00 GMT 2009


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


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /