delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/21/09:27:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Tue, 21 Oct 2003 09:26:29 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Grossniklaus Bruno <grossnik DOT mailinglists AT bluewin DOT ch>
cc: cygwin AT cygwin DOT com
Subject: Re: ProFTPD 1.2.9rc2: "missing /var/log/wtmp"
In-Reply-To: <3F710B1D0009C8EA@mssbzhh-int.msg.bluewin.ch>
Message-ID: <Pine.GSO.4.56.0310210917320.15002@slinky.cs.nyu.edu>
References: <3F710B1D0009C8EA AT mssbzhh-int DOT msg DOT bluewin DOT ch>
Importance: Normal
MIME-Version: 1.0

On Tue, 21 Oct 2003, Grossniklaus Bruno wrote:

> Hello Igor
>
> >if [ ! -d /var/log ] ; then \
> >  mkdir -p /var/log ;
> >fi
> >if [ ! -f /var/log/wtmp ] ; then \
> >  touch /var/log/wtmp ;
> >fi
> >
> >FWIW, it'd be safer to also check whether this file is a symlink (i.e.,
> >add "-a ! -l /var/log/wtmp" to the test), but this should do for now.
              ^
Umm, make that "-h"...  Sorry.

> What about a chmod 666 /var/log/wtmp after the touch?
>
> Bruno

Yep, forgot that.  Ok, take 2:

if [ ! -d /var/log -a ! -h /var/log ] ; then \
  mkdir -p /var/log ;
  chmod a+x /var ;
  chmod 1777 /var/log ;
fi
if [ ! -f /var/log/wtmp -a ! -h /var/log/wtmp ] ; then \
  touch /var/log/wtmp ;
  chmod 666 /var/log/wtmp ;
fi

Thanks for the comments,
	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!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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