[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mkdir, umask, and install

From: Billy Biggs
Subject: mkdir, umask, and install
Date: Sun, 4 May 2003 23:00:19 -0400
User-agent: Mutt/1.4i

  In my application, I install some required data files into pkgdatadir,
and install my default configuration file (docs/default.tvtime.xml) to
sysconfdir, renaming it to $(sysconfdir)/@PACKAGE@/tvtime.xml

  A user complained that when using a umask of 0077 during 'make
install', users can run the application, but not access the data files.
Further investigation has me confused about correctness.

  automake seems to install data files using install -m 644, and install
ignores umask, so the files in the data directory are world readable, as
is the binary.  However, the directories (bin, share, share/tvtime) are
created using mkdir, which listened to the umask.

  It's unclear what a good policy is here.  Should install be listening
to umask?  Should automake use install to create directories and also
ignore umask?  In our Makefile.am, we handle creation of
sysconfdir/@PACKAGE@ ourself, and we use $(INSTALL), should we use mkdir
instead to be consistent with automake?

  Ignoring umask seems bad, but this user was quite annoyed that our app
installed the binary and data files world readable, but not the share
directory (crippling our application).  Thoughts?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]