From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: 1.7.10/1.7.11: .Net programs started from a cygwin console may fail.
Date: Wed, 29 Feb 2012 09:42:00 -0000 [thread overview]
Message-ID: <20120229092539.GP23440@calimero.vinschen.de> (raw)
In-Reply-To: <20120228214136.GM23440@calimero.vinschen.de>
On Feb 28 22:41, Corinna Vinschen wrote:
> The culprit is setup.exe apparently. If it sets 1777 permissions, it
> uses the same permissions for the inheritable default permissions. It
> should remove the write bits before creating the inheritable default
> permissions. In Cygwin this is controlled by the umask, but setup
> doesn't know about a umask.
>
> So, the correct solution is to change setup.exe to create less dangerous
> default permissions for the Win32 apps in case of 1777 dirs. That makes
> the tmp/temp stuff in etc/profile unnecessary.
I just applied a fix to setup so that the default permissions for dirs
created with the sticky bit (t) set don't contain write permissions for
group and other. I see to it that it will be uploaded to cygwin.com
shortly.
> The *big* problem are the already existing /tmp dirs with bad permissions
> throughout the Cygwin users.
>
> David, instead of setting tmp/temp, What about adding the following line
> to /etc/profile?
>
> setfacl -m d:g::r-x,d:o:r-x /home /tmp /usr/tmp /var/log /var/run /var/tmp 2>/dev/null
>
> That sets the list of directories created with 1777 permissions by
> setup.exe itself to more sane permissions. Maybe it could be combined
> with a marker file, along these lines:
>
> if [ ! -f /etc/.177fix ]
> then
> setfacl -m d:g::r-x,d:o:r-x /home /tmp /usr/tmp /var/log /var/run /var/tmp 2> /dev/null && touch /etc/.177fix
> fi
That should have been /etc/.1777fix, of course. I think something like
this is necessary since it makes sure that setfacl is called once by a
user with the right permissions and then it's just ignored ever after.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2012-02-29 9:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 16:54 Andres Martinelli
2012-02-28 14:15 ` Corinna Vinschen
2012-02-28 14:18 ` Jon Clugston
2012-02-28 14:50 ` Corinna Vinschen
2012-02-28 21:42 ` David Sastre Medina
2012-02-28 23:05 ` Corinna Vinschen
2012-02-29 9:42 ` Corinna Vinschen [this message]
2012-02-29 1:36 ` Andrey Repin
2012-02-29 9:47 ` Corinna Vinschen
2012-02-29 12:39 ` Andrey Repin
2012-02-29 12:49 ` Earnie Boyd
2012-02-29 14:51 ` Corinna Vinschen
-- strict thread matches above, loose matches on Subject: below --
2012-03-12 19:51 James Johnston
2012-03-13 19:58 ` David Sastre Medina
2012-03-01 18:49 Matt Seitz (matseitz)
2012-03-01 18:17 Matt Seitz (matseitz)
2012-03-01 18:41 ` Corinna Vinschen
2012-02-29 22:47 Matt Seitz (matseitz)
2012-03-01 10:09 ` Corinna Vinschen
2012-02-27 16:12 Andres Martinelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120229092539.GP23440@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).