X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=1.5 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_RW,TW_WX,TW_XR,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org From: "Andy Hall" To: References: <9872BD92701C494686D002F1620610D0 AT ahallpc> <20101006084740 DOT GS5480 AT calimero DOT vinschen DOT de> Subject: RE: In what way is /cygdrive special WRT to permissions? Date: Mon, 18 Oct 2010 08:46:00 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com One final note on this: At Jeremy's suggestion, I tried changing the way /cygdrive is mounted. As Administrator I changed /etc/fstab to read //vega/repository /repos smbfs binary,noacl 0 0 none /cygdrive cygdrive binary,noacl,user 0 0 Mount now shows Administrator AT taurus ~ $ mount //vega/repository on /repos type smbfs (binary,noacl) C:/cygwin/bin on /usr/bin type ntfs (binary,auto) C:/cygwin/lib on /usr/lib type ntfs (binary,auto) C:/cygwin on / type ntfs (binary,auto) C: on /cygdrive/c type ntfs (binary,noacl,posix=0,user,noumount,auto) D: on /cygdrive/d type iso9660 (binary,noacl,posix=0,user,noumount,auto) F: on /cygdrive/f type smbfs (binary,noacl,posix=0,user,noumount,auto) H: on /cygdrive/h type smbfs (binary,noacl,posix=0,user,noumount,auto) Note that all drives now seem to inherit noacl from the mount of /cygdrive which for C: may not be what you want either. An ls -l of /cygrive/f now shows Administrator AT taurus ~ $ ls -l /cygdrive/f total 2048 drwxr-xr-x 36 Administrator None 0 2010-10-07 12:35 builds drwxr-xr-x 17 Administrator None 0 2010-10-04 18:23 releases and testing the ability to write you have Administrator AT taurus ~ $ test -w /cygdrive/f/builds && echo you can write you can write This was always the case when you have Administrator privileges. But, when logged in as user build which does not have Administrator privileges, you now have: $ ls -l /cygdrive/f total 2048 drwxr-xr-x 36 build None 0 2010-10-07 12:35 builds drwxr-xr-x 17 build None 0 2010-10-04 18:23 releases and $ test -w /cygdrive/f/builds && echo You can write You can write Which is the way cygwin 1.5 behaved! Perhaps the default mounting of file systems that are not NTFS should be with noacl, but that is a question best answered by more knowledgeable people. It would at least make the behavior of test consistent which what you can actually do with the filesystem. > > Corinna - > > Thanks for the reply and clarification. I have made the obvious change in > my mounts to get around this problem. However, there has been a change > in behavior between 1.5 and 1.7. I have 1.7.7 installed on Windows > Server 2003 SP2. > > The mount table shows > > $ mount > //vega/repository on /repos type smbfs (binary,noacl) > C:/cygwin/bin on /usr/bin type ntfs (binary,auto) > C:/cygwin/lib on /usr/lib type ntfs (binary,auto) > C:/cygwin on / type ntfs (binary,auto) > C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto) > D: on /cygdrive/d type iso9660 (binary,posix=0,user,noumount,auto) > F: on /cygdrive/f type smbfs (binary,posix=0,user,noumount,auto) > H: on /cygdrive/h type smbfs (binary,posix=0,user,noumount,auto) > > F: also happens to be mapped to //vega/repository via the normal Windows > mechanisms. > > When signed on to the Administrator account you have: > > Administrator AT taurus ~ > $ ls -l /repos > total 2048 > drwxr-xr-x 36 Administrator None 0 2010-10-04 19:30 builds > drwxr-xr-x 17 Administrator None 0 2010-10-04 18:23 releases > > Administrator AT taurus ~ > $ test -w /repos/builds && echo writeable > writeable > > Administrator AT taurus ~ > $ ls -l /cygdrive/f > total 2048 > drwxrwxr-x 36 ???????? ???????? 0 2010-10-04 19:30 builds > drwxrwxr-x 17 ???????? ???????? 0 2010-10-04 18:23 releases > > Administrator AT taurus ~ > $ test -w /repos/builds && echo writeable > writeable > > When logged on as the non-admistrative user build you have: > > build AT taurus ~ > $ ls -l /repos > total 2048 > drwxr-xr-x 36 build None 0 2010-10-04 19:30 builds > drwxr-xr-x 17 build None 0 2010-10-04 18:23 releases > > build AT taurus ~ > $ test -w /repos/builds && echo writeable > writeable > > build AT taurus ~ > $ ls -l /cygdrive/f > total 2048 > drwxrwxr-x 36 ???????? ???????? 0 2010-10-04 19:30 builds > drwxrwxr-x 17 ???????? ???????? 0 2010-10-04 18:23 releases > > build AT taurus ~ > $ test -w /cygdrive/f/builds && echo writeable > > build AT taurus ~ > $ echo test >/cygdrive/f/builds/zap > > build AT taurus ~ > $ ls -l /cygdrive/f/builds/zap > -rwxrwxr-x 1 ???????? ???????? 5 2010-10-06 16:11 /cygdrive/f/builds/zap > > Notice that the test -w /cygdrive/f/builds reports that /cygdrive/f/builds > is not writeable, yet you can create and write files in > /cygdrive/f/builds! > THIS IS INCONSTENT BEHAVIOR. Cygwin 1.5 did not have this behavior. > > Regarding the mount of drive letters via /etc/fstab. I am not sure what > the documentation should say about this. Overriding the default mount of > a single drive letter in fstab actually seems to work, although it simply > reproduces the same behavior as the default. > > Even if I understood the actual behavior, I regret that am not familiar > with the ways of Cygwin source maintenance to make the documentation > changes. I have to leave this to somebody else more qualified. > > Cheers, Andy > > > > On Oct 6 1:48 Corinna Vischen wrote: > > > > > > On Oct 5 15:40, Andy Hall wrote: > > > If instead, I map F: to /cygdrive/c with the following entry in > > /etc/fstab > > > > > > F: /cygdrive/f smbfs binary,noacl 0 0 > > > > > > mount shows > > > > > > $ mount > > > C:/cygwin/bin on /usr/bin type ntfs (binary,auto) > > > C:/cygwin/lib on /usr/lib type ntfs (binary,auto) > > > C:/cygwin on / type ntfs (binary,auto) > > > F: on /cygdrive/f type smbfs (binary,noacl) > > > C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto) > > > > > > And ls -l of /cygdrive/f shows > > > > > > $ ls -l /cygdrive/f > > > total 2048 > > > drwxrwxr-x 36 ???????? ???????? 0 2010-10-04 16:30 builds > > > drwxrwxr-x 17 ???????? ???????? 0 2010-10-04 15:23 releases > > > [...] > > > Why am I getting -1 for the uid and gid when I mount to /cygdrive/f > but > > not > > > to /repos1? > > > > That's a restriction of the cygdrive prefix handling. You can't > > override the cygdrive mount options for a single drive. It's an > > all or nothing thingy. I guess it would help to refuse such paths > > in /etc/fstab or mount(1), or at least improve the documentation, > > but, well, http://cygwin.com/acronyms/#SHTDI. > > > > > > 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 -- 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