X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Steve Holden <steve@holdenweb.com>
Subject:  Re: Setting cygwin permissions from Windows programs
Date:  Tue, 20 Dec 2005 14:32:51 +0000
Lines: 50
Message-ID: <do94mk$kmv$1@sea.gmane.org>
References:  <do8oog$bds$1@sea.gmane.org> <43A80BC9.2060908@cygwin.com>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding:  7bit
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
In-Reply-To: <43A80BC9.2060908@cygwin.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Larry Hall (Cygwin) wrote:
> Steve Holden wrote:
> 
>> I am writing a Python program to generate file trees to be distributed 
>> to a Linus machine using Cygwin's scp. As the GUI to this program uses 
>> wxPython, a native Windows approach is the most straightforward.
>>
>> Is there any way to set permissions on the output files from the 
>> Windows side that will result in predictable permissions when the 
>> output tree is viewed from Cygwin?
>>
>> A Python recipe would be useful, but I'll take what I can get!
> 
> 
> Have you checked what the permissions on a file you created by Windows 
> looks
> like under Cygwin and seen some problem?  If so, please post the details 
> and
> perhaps someone can help.  Otherwise, I'd suggest just doing the above and
> working with the result unless you see problems.  In general, unless you've
> done something to restrict access in Windows, Cygwin can see and interact
> with "natively created" files just fine.
> 
Holger Krull wrote:
 > Cygwin doesn't have an own management of permissions. So any program
 > that modifies permission in Windows will be able to change permissions
 > for cygwin files. cacls and xcacls are command line tools from windows.
 > Don't know how this would be usually done in python.
 >

Thanks for the responses. The issue is that I'd like the files to appear 
in Cygwin with permissions of -rwxr--r--, or -rwxr-xr-x for executables 
and directories.

I'm trying to avoid having to use Cygwin utilities to assert Cygwin 
permissions, but I am unable to determine the Windows permissions I must 
assert when creating the files in order for Cygwin to see those 
permissions. Currently a newly created file appears as:

-rwx------  1 sholden None 13834 Dec 20 14:26 index.html

This is under Win XP. Are the Cygwin and Windows permissions different 
universes that don't interact?

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/


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

