delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/04/22/00:27:37

X-Spam-Check-By: sourceware.org
X-SBRS: None
X-BrightmailFiltered: true
X-IronPort-AV: i="4.14,436,1170633600"; d="scan'208"; a="1155154231:sNHT24246240"
MIME-Version: 1.0
Subject: Network drive mapping with tsclient has permission denied
Date: Sat, 21 Apr 2007 21:27:07 -0700
Message-ID: <BA2525054DCF67438045B405EB3754B60173FCFC@BCMSG113.corp.ads>
From: "Ross Lavender" <Ross DOT Lavender AT TELUS DOT COM>
To: <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l3M4RLNR005063

I have a non-administrative installation of Cygwin on Windows Server 2003 that I connect to from a laptop running Windows XP by using Remote Desktop.
The laptop's local C drive is shared over the connection by using the Remote Desktop / Windows Terminal Server (tsclient) functionality :

e.g. in a .bat startup script on the Windows server, I do this to mount a directory from the laptop

net use z: \\tsclient\c\zfolder

In Windows on the server, I can see and read/write the files with Windows applications in the mounted folder and in a Cygwin Ksh shell an automatic mount of z: has been done:

t838014 AT BCSDITS3:/home/t838014> mount
H:\cygwin\bin on /usr/bin type user (binmode)
H:\cygwin\lib on /usr/lib type user (binmode)
H:\cygwin on / type user (binmode)
c: on /cygdrive/c type user (binmode,noumount)
e: on /cygdrive/e type user (binmode,noumount)
h: on /cygdrive/h type user (binmode,noumount)
z: on /cygdrive/z type user (binmode,noumount)

However, in Cygwin when I try to access (stat) any of the directories in or under /cygdrive/z, I get permission denied:

t838014 AT BCSDITS3:/home/t838014> ls -las /cygdrive/z
ls: reading directory /cygdrive/z: Permission denied
total 0
0 drwxr-xr-x 0 t838014 Administrators 0 Dec 31  1969 .
0 dr-xr-xr-x 1       0 root           0 Dec 31  1969 ..

But, if I know where a file is located within this directory (or a sub-directory), I can use it in Cygwin:

t838014 AT BCSDITS3:/home/t838014> echo "this works" > /cygdrive/z/foo

t838014 AT BCSDITS3:/home/t838014> ls -asl /cygdrive/z/foo
1 -rw-r--r-- 1 t838014 Administrators 11 Apr 21 21:11 /cygdrive/z/foo

t838014 AT BCSDITS3:/home/t838014> cat /cygdrive/z/foo
this works


Note that I've set the CYGWIN env. variable to "binmode ntsec" and I've tried setting smbntsec on as well.

So, why can I see the files with Windows Explorer, but yet not with an "ls" in Cygwin? Is there a fix of some kind for this odd behaviour?

Ross Lavender
Sr. Technology Specialist
TELUS ITI, NIVR/CTI Operations
t 604.432.5930
c 778.828.4802
p 604.320.1020
www.telus.com 
TELUS(r)
The future is friendly(r) 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


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