This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin dll: UID and GID information not shown from remote drive

On Dec 13 16:24, Jari Aalto wrote:
> ** To CC Emacs BTS, use 10257(at)
> My full original bug report was sent initially to Emacs, because the editor
> started considering remotes file as read-only and requiring confirmation
> after every save. See:
> It appears that Cygwin doesn't show UID and GID on Network drives (Win 7
> x64), that are connected with windows "Map Network Drive" to a
> Debian/Samba(
>     $ ls -la /cygdrive/z/tmp/test-epackage.el
>     -rwxr--r-- 1 ???????? ???????? 437 Dec  9 20:02 /cygdrive/z/tmp/test-epackage.el

It's not a bug.

If you use winbind and the user accounts are correctly mapped to
Windows accounts, then you would see the Cygwin UIDs/GIDs correspoding
to the SID of the AD user account.

If you don't do that, there's only an invisible mapping from the Windows
SID to the Unix uid/gid.  The actual UNIX account has not the same mapping
back to the Windows SID.  Instead, the SID returned from Samba to
Windows is a fake SID S-1-22-1-UnixUID or S-1-22-2-UnixGID.

The easiest way to workaround this issue is to mount the share with
the noacl mount option:

  //sambaserver/share /myserver somefs binary,noacl 0 0

Alternatively you must coax Cygwin into thinking that both SIDs are the
same account.  What you can do is to map these SIDs to the desired
Cygwin UID/GID using matching entries in /etc/passwd and /etc/group,
like this:




To generate the Unix SID entries for /etc/passwd and /etc/group, see
the mkpasswd/mkgroup -U options:

  $ mkpasswd -l sambaserver -U corinna
  $ mkgroup -l sambaserver -U vinschen

Just tweak the UID/GID fields and make sure that the Samba fake entries
are later in the file than the entries with the correct Windows SID mapping.


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

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]