This is the mail archive of the
mailing list for the Cygwin project.
Re: File permissions and VSS failure
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin at cygwin dot com
- Date: Tue, 17 Oct 2006 21:36:08 -0700
- Subject: Re: File permissions and VSS failure
- References: <email@example.com>
- Reply-to: 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
> 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'.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html