delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/08/08/06:44:09

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=F/hdkQLLk0jwSMPDIpsofekEYZKVSeDzXHrCj2Wg9dOdtsT4Osr+z
MiM2M5tKS1nM0epJJdpMZRVzSEDYaa5grkw3a3TPsIp3bSeb7FEQrTROZzEJK3Ox
lA1zS0biUcO9EL5aVLYtGVifcDRdOfjJisUFRnRjAL+a2UsV4hnMT8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=eCUZFpJ4TUXvpDZwEDhVA8MQ/0I=; b=M1y5sMfsOEQfLOiiTKqmLqDHgER5
luLXHCOCOl3wEWmetHeahQ4BQINInQWuNnnPfAeP/gqQ7ybaxy+XsG5asSzxxx/2
3wm0qFtC2f5ACMoFQQKjBUzxaoy0nWUqfaRWJJk+S/fjTxNnlEw90oJcuqnVlD2h
f9Df6FS+3plKT7g=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Fri, 8 Aug 2014 12:43:34 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Security Settings for directories created in Cygwin (+ executable bit on files)
Message-ID: <20140808104334.GY13601@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <86wqajxtm9 DOT fsf AT somewhere DOT org>
MIME-Version: 1.0
In-Reply-To: <86wqajxtm9.fsf@somewhere.org>
User-Agent: Mutt/1.5.23 (2014-03-12)

--a+0P3INHs7aeI7wh
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Aug  8 10:39, Sebastien Vauban wrote:
> Hello,
>=20
> Currently, whenever I create new files from Windows 8 executables (such
> as Notepad), they're often flagged as "executable", even for text files!

Perfectly normal.  This is Windows default behaviour for applications
which don't care for permissions.  Like Notepad for instance.

> I've noticed that such a behavior happens when I create a new file in
> a directory that has been made FROM CYGWIN (`mkdir ~/test/', for
> example).
>=20
> Indeed, the permissions of CYGWIN-CREATED DIRECTORIES seem very weird:
>=20
> - "Inherited from"... "None"!

Perfectly valid.  This has been discussed already years ago.  It's the
Windows(!) default primary group for users on a standalone machine (not
domain member machine).  It's the local group with RID 513, called "None"
on english language systems.

> - "All Users" having "Read & Execute" permission on "this folder,
>   subfolders and FILES"...

Correct.  Compare with Linux.

> IIUC, when creating a new file from Cygwin, the `umask' (022, in my
> case) is respected and new files are not executables then, except if
> I require it explicitly (via `chmod').

Right, because Cygwin follows the POSIX permission model, unless
you use the noacl mount flag.

> Though, when creating a new file from a Windows executable, Windows
> inherits permissions from the folder where my file gets created --
> hence, an executable permission if the directory was created from
> Cygwin...
>=20
> How to correct that?

You can't without lots of fiddeling.  Windows executables use Windows
permissions and typically inherit the permissions from the parent
folder.  The best way to workaround this is by using a Cygwin
executable to generate the files, vim or emacs instead of notepad.

> Asking Cygwin to stop playing with the Windows ACL, by mounting my
> personal directories as "noacl"?  Well, that means I won't be able to
> use `chmod' anymore, for setting a script file as "executable", then.
> And I'll have to use a Windows tool to do so, such as `cacls'.
>=20
> Is it really so, the integration of Cygwin permissions within Windows?
> Or do I miss something?

You're just missing that the integration is one-way.  Non-Cygwin Windows
executables give a damn for Cygwin settings.  Sorry :}


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--a+0P3INHs7aeI7wh
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJT5KnWAAoJEPU2Bp2uRE+gQDsP/RGYwYbmLHFozxuNUtnJUL5H
9fhprKno175EkFW+rxjPusJCCtb4jib3Ejk2YJqWTtzkAmPOWgdEqHxA0ROeQXQ0
j8f5Bdg1BTLxIhZWLWT1N9fd3uvxKX3obLZjITp9Y12HIxRdBmojsqbgU1hGaOQh
amkMV+Ty11B87enmdEVLfjvdcOEjQj6FFnOUkhJmHxkzqGS66WBrk0jhzno5yorS
tX8PMLOnwIsi/ho3k61oiWPHYsrStULOdZf0Qg3lXBIVGHsWaBhHwEAj7QEhAcdV
F2Lfui/X7j6blFFkEDSRavH65ZH44KoSvFRBH7Krs+gVxZg25iObwC8lGs4ZtBUp
Z2e/r9DdOJwqVugn6wKktAl2WjSyMQGQxvRQwbmkEAEh0+hDpV14sQ8IN+G7LO/X
NQhhMmoDn89RahwmRgJD18jRvohsI989+LfyGU1FUCyoL+5ssSQ7Xc5paNe7iqsO
2SpwMxVjZIZLgEHBuNgEmKWFxkGoXNq/vRelEHIInshEE+XRJBJHT74+NI8/ntsG
vUnqxoQ0Lp5dbHgsucDGoEwdjhf5YjQGzggTm/A/3jM51rObDTzTwXTQkHTnIuSL
W1zSjfyHbx5rviQWXFHjLWIhVL1JJePMKr/rTo7IjzUkSDQeylCSCSIoaZx2DHh2
KCiB9KQNzHOq6K8dK3ak
=z/Bi
-----END PGP SIGNATURE-----

--a+0P3INHs7aeI7wh--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019