Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <00e601c09d10$379e4250$d938a8c0@Hadfield> From: "Mark Hadfield" To: References: <20010221232921 DOT X908 AT cygbert DOT vinschen DOT de> <000a01c09c73$7a43ce10$d938a8c0 AT Hadfield> <20010221212656 DOT F7576 AT redhat DOT com> Subject: Symlinks, executability, system attribute, etc (was Re: [ANNOUNCEMENT]) Date: Fri, 23 Feb 2001 09:44:13 +1300 Organization: NIWA MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 From: "Christopher Faylor" > No. Cygwin only does symlink tests on files which have the system attribute > set. This was hashed, rehashed and bitterly noted in a recent thread here. > It does open the file to see if it has a '#!', marking it executable if so. > > [and later...] You could solve this by either reading the code or paying > attention to the mailing list... Thanks for the clarification. I did see several messages at the end of that thread but I failed to see the relevance. I apologise for not doing more thinking/research on this before bringing it to the list. I was planning on leaving it for a few weeks but I was stung into action by Corinna's announcement . > Possibly setting CYGWIN=ntsec will avoid this overhead. Mounting the directory > with the '-x' flag will certainly avoid it at the expense of having cygwin > think that every file in the directory is executable. Yes, "mount -x" works but is a bit drastic as you say. Another solution that would fit my needs in this particular case better (but is even more drastic) is to have a mount option guaranteeing that NONE of the files in the directory are executable. Just a thought. Another thought about symlinks, executability etc. IF a change like Corinna's proposal is adopted and IF some time in the future support for current-style symlinks is dropped (or can be turned off optionally) then Cygwin will know that all symlinks have the extension .lnk and it will no longer need to use the system attribute for that purpose. Could the Windows system attribute then be used to indicate executability,i.e. the rule would be that a file is executable if the extension is .exe etc OR the system attribute is set. Voila, no need to look inside files for #! I don't think there are any particularly serious consequences about having the system attribute set on script files. On the Unix machines I deal with, Samba maps the executable attribute on the Unix host to the system attribute on the Windows client. I deal with such files all the time via Windows software and have had only minor problems: Explorer asks for confirmation before I delete them and my text editor (PFE) clears the system attribute when it changes the file. Of course, if consistency between Windows & Cygwin paths inside a .lnk file is considered to be too problematic, then Cygwin symlinks could be identified by some other extension. --- Mark Hadfield m DOT hadfield AT niwa DOT cri DOT nz http://katipo.niwa.cri.nz/~hadfield National Institute for Water and Atmospheric Research -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple