delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/02/05/12:22:55

X-Spam-Check-By: sourceware.org
Message-ID: <45C767CC.2020905@jhmg.net>
Date: Mon, 05 Feb 2007 11:22:20 -0600
From: Jim Garrison <jhg AT jhmg DOT net>
Reply-To: jhg AT acm DOT org
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: File mode 0700 for windows-created files?
References: <45C392E1 DOT 2040307 AT jhmg DOT net> <01b701c7487c$c0d3a970$2e08a8c0 AT CAM DOT ARTIMI DOT COM>
In-Reply-To: <01b701c7487c$c0d3a970$2e08a8c0@CAM.ARTIMI.COM>
OpenPGP: id=70738D88; url=http://www.jhmg.net/contact.html
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

Dave Korn wrote:
> On 02 February 2007 19:37, Jim Garrison wrote:
>   
>> Every file created by a non-Cygwin app appears in Cygwin
>> with mode 0700.  I've read the documents pertaining to
>> ntfs permissions in Cygwin but don't see a way to configure
>> things so that Cygwin sees them as a more reasonable 0755
>> or 0644 (for non-executables).
>>     
>> I have a valid /etc/passwd and /etc/group (generated by
>> mkpasswd and mkgroup).
>>
>> Is it possible to configure Cygwin so it sees
>> non-Cygwin-created files as 0644 or 0755?
>>     
>
>   Cygwin represents the perms as whatever the posix equivalent is of the perms
> that the win32 app that created the file set, so is it possible the files are
> genuinely being created with perms only for your user?  Bear in mind that
> permissions can be inherited on a newly created file from the parent directory
> containing the new file...
>
>   As a test, I created an empty text file through the explorer context menu
> (New->Text Document).  In /tmp, it showed up with 777 perms automatically.
> However, in a directory with 755 perms, it showed up with 755 perms.
>
>   Are you testing this with different win32 apps and creating files in
> different directories and seeing the same result everywhere?  If you create a
> file in /tmp using windows explorer like I did, how does it show up in the
> output of 1) "ls -la", 2) "getfacl", 3) "cacls" ?
>   
Interesting.  I get the desired results if I change the NTFS permissions
for the folder to "Everyone (Read & Execute)".  After that one change,
all existing files in the folder now show up 0755 instead of 0700.

Doing a Cygwin "chmod 0755" on the folder had no effect on inherited
permissions, but DID change the permissions shown by "ls -ld ."

Does Cygwin store its own "override" permissions if you use the chmod
command?

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