install-sh - permission denied

Paul Schmehl pschmehl_lists at
Tue Oct 20 17:40:36 UTC 2009

--On Tuesday, October 20, 2009 12:31:43 -0500 Matthew Seaman 
<m.seaman at> wrote:

> Paul Schmehl wrote:
>> I'm working on a new port, and I'm getting this error during make install:
>> test -z "/usr/local/bin" || .././install-sh -c -d "/usr/local/bin"
>> .././install-sh: Permission denied
>> Can anyone tell me why I'm getting this?
>> My system is 7.2 STABLE
>> 7.2-STABLE FreeBSD 7.2-STABLE #13: Thu Sep 24 09:02:53 CDT 2009
>> Ports are csuped daily.
> At a guess, it's because you don't have sufficient permissions to run
> .././install-sh with the arguments shown.  Now, one fairly obvious reason
> why this wouldn't work is that .././install-sh isn't marked executable for
> your UID.  Judging by the file name, this is a shell script, so also check
> that your UID has sufficient permissions to run the shell on the #! line
> of the script too.
> I can't really tell just by looking at the command names, but I'm guessing
> that this command creates /usr/local/bin as a directory if it doesn't already
> exist.  Basically an obscurantist and over-engineered way of running a simple:
>    # mkdir -p /usr/local/bin
> This is entirely unnecessary when dealing with the ports.  You may take it
> as read that the basic layout of directories under /usr/local will have been
> created for you by using mtree(8) and /etc/mtree/BSD.local.dist

The problem is, I'm doing this as root.  :-(

Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson

More information about the freebsd-ports mailing list