bug-coreutils
[Top][All Lists]
Advanced

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

Re: install -d sometimes fails


From: Bob Proulx
Subject: Re: install -d sometimes fails
Date: Mon, 14 Jun 2004 10:41:04 -0600
User-agent: Mutt/1.3.28i

address@hidden wrote:
> Some makefiles (like the one from gtk-gnutella-0.93.4 
> gtk-gnutella.sf.net) cause messages like these when i run "make install" 
> as non-root:
> 
> /usr/bin/install -d /usr/local/share
> /usr/bin/install: cannot change permissions of `/usr/local/share': Operation 
> not permitted
> make[2]: *** [install-data-yes] Error 1
> 
> On my box, the /usr/local hierarchy is already writeable by my usual 
> user account. IMHO, if a directory is already present and writeable, 
> "install" should not try to change permissions (or at least it shouldn't 
> stop the "make"-process). I'm using GNU install 5.0 from Debian.

On my Debian 'woody' machine: [I am in group 'staff'.]

  /usr/bin/install -d /tmp/testdir
  ls -ld /tmp/testdir
  drwxr-xr-x    2 bob      bob          4096 2004-06-14 10:26 /tmp/testdir

  ls -ld /usr/local/share
  drwxrwsr-x   10 root     staff         272 2004-05-02 19:56 /usr/local/share
  /usr/bin/install -d /usr/local/share
  /usr/bin/install: cannot change permissions of `/usr/local/share': Operation 
not permitted

The problem is that the default permissions
for install are 'rwxr-xr-x' and the directory is currently
'drwxrwsr-x' therefore the program is attempting to make the change to
make the directory not group writable.  It can't because root owns the
file.

You would not really want the directory group non-writable because it
would break the ability of group 'staff' to function properly.  I
don't think you want to change the default of 'install' without a mode
to be group writable because installs into other locations which
should not be writable would be broken in that case.

I really can't see a solution which makes both cases work.  Do you have
any suggestions?

I did not look at the makefiles for the programs you cited but I think
the problem must reside there.  They should not be installing files in
the share directory, only files.  Therefore I do not think they should
be trying to make /usr/local/share but should instead be making
directories beneath it.  So I think the reasonable place to fix this
is in the project makefiles.

Bob




reply via email to

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