delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/10/18/00:36:25

X-Spam-Check-By: sourceware.org
Message-ID: <4535AF38.E60AFB35@dessent.net>
Date: Tue, 17 Oct 2006 21:36:08 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: File permissions and VSS failure
References: <6 DOT 1 DOT 2 DOT 0 DOT 2 DOT 20061017220038 DOT 07e35ec0 AT pop3 DOT palg DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

"Joseph C. Nemeth" wrote:

> I use tar to package a set of files on Unix boxes (multiple flavors), and
> 'download' them to my NTFS WinXP Pro box under Cygwin, where I maintain
> them using Windows-style tools, including Microsoft Visual Source Safe.
> Then, I 'upload' them back to the Linux box, where they get compiled and
> executed.
> 
> When I 'download' files from Unix, the permissions somehow get messed up,
> and VSS balks with an error 'Access to file 'whatever' denied." The MS Help
> claims this is permissions or a file-locking problem. It turns out, it's a
> permissions problem, but it's deep in the bowels of the software.

So, it sounds like you need to just do "CYGWIN=nontsec tar x ..."
followed by "attrib +R c:\path /s".  nontsec prevents Cygwin from
setting the ACLs and attrib sets the read-only bit.

> file permissions. Getting into the NTFS ACL calls is the usual slog through
> the Microsoft maze of horrors, and is not for the faint of heart: see
> closing notes.

Or just use getfacl/setfacl, cacls, or xcacls.  There's no need to write
code to do this.

> However, you can then go through
> with a simple Windows program that calls the POSIX library _chmod() to make
> the file Read-Only: it won't affect the ACLs, but it will set the Read-Only
> bit and keep VSS happy.

No need to invent anything here either, that program has existed since
the dawn of MSDOS era as 'attrib'.

Brian

--
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