www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/20/10:08:55

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Mon, 20 Sep 2004 10:08:45 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: Login behaviour oddities: won't run .profile
In-Reply-To: <20040920091729.GU17670@cygbert.vinschen.de>
Message-ID: <Pine.GSO.4.61.0409200952540.20009@slinky.cs.nyu.edu>
References: <20040920081046 DOT E810484CCE AT pessard DOT research DOT canon DOT com DOT au> <20040920091729 DOT GU17670 AT cygbert DOT vinschen DOT de>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Mon, 20 Sep 2004, Corinna Vinschen wrote:

> On Sep 20 18:10, luke<dot>kendall<at>cisra<dot>canon<dot>com<dot>au wrote:
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Hmmm?

> > I looked into a problem reported today, that ~/.profile is not executed
> > if you use Cygwin to create your home directory, instead of using
> > Windows Explorer to create the directory.
> [snip]
> > We managed to set the two directories to appear to have identical ACLs
> > according to the Advanced security tab in the Windows Explorer
> > properties - but that still didn't help!
> [snip]
>
> Sorry but this is bogus.  There's no difference whether a directory is
> created using Cygwin or Windows.

Umm, sure there is.  Windows Explorer will inherit the permissions of the
parent directory by default, whereas Cygwin will always create a new set
of ACLs (or, at least, I haven't found a way to make Cygwin directories
inherit the parent's ACLs).  I don't know how that can make a difference,
but there it is.

@Luke: when you say "use Cygwin to create the home directory", do you mean
"let /etc/profile create it for you", or "use Cygwin's mkdir"?  If the
latter, then Corinna's right, and it shouldn't make any difference (even
if the inheritance properties differ).  If the former, then beware that
one of the /etc/skel files copied to $HOME by /etc/profile is
".bash_profile", which bash will use in preference to ".profile".  If the
home directory already exists by the time /etc/profile is first run for a
user, the /etc/skel files won't be copied, which I think is what's
happening in your case.

One solution is to remove /etc/skel/.bash_profile after the installs
(maybe even in your own site-specific postinstall script).  I don't know
if the base-files postinstall script will re-create that file, though --
if it does, it needs to be fixed.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

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