This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Login behaviour oddities: won't run .profile


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@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]