Operating System - HP-UX
1822543 Members
2754 Online
109642 Solutions
New Discussion юеВ

bzip2 error - execute permission denied

 
SOLVED
Go to solution
Ratzie
Super Advisor

bzip2 error - execute permission denied

I just installed hp 11.11
And needed bzip2, I dont know if it was on the system already, from install, but I downloaded it from:
http://hpux.connect.org.uk/hppd/hpux/Misc/bzip2-1.0.4/

All directories have execute permissions, but I get an error when I use it:

# bunzip2 offline_backup.tar.bz2
sh: bunzip2: Execute permission denied.
# bzip2
sh: bzip2: Execute permission denied.

I even get a error even when I launch it from /usr/local/bin

I got no errors during install.

Was there a full GNU package that was installed at the beginning? I see there are lot more in /usr/local/bin that are for GNU apps then what I installed.
I also have the dame problem with /usr/local/bin/tar

10 REPLIES 10
Dennis Handly
Acclaimed Contributor

Re: bzip2 error - execute permission denied

What does ll(1) and file(1) show for these two files?
Do you have a PA-RISC 2.0 system?
What does model(1) show?
Steven Schweda
Honored Contributor
Solution

Re: bzip2 error - execute permission denied

> [...] I downloaded it [...]

What, exactly was "it"? I just fetched
bzip2-1.0.4-hppa-11.11.depot.gz from there,
and got an executable which appears to be
entirely suitable for my 11.11 system.

dy # ./bzip2 --version
bzip2, a block-sorting file compressor. Version 1.0.4, 20-Dec-2006.
[...]

dy # file ./bzip2
./bzip2: PA-RISC2.0 shared executable dynamically linked

dy # uname -a
HP-UX dy B.11.11 U 9000/785 2012616114 unlimited-user license


Of course, the current version is 1.0.5, and
it's not written to be compatible with the
(lame) bundled C compiler on this OS, but if
you can get GCC installed and running, you
might be happier in the long run (building
things like this from their sources).

dy # /usr/local/bin/bzip2 --version
bzip2, a block-sorting file compressor. Version 1.0.5, 10-Dec-2007.
[...]

dy # file /usr/local/bin/bzip2
/usr/local/bin/bzip2: PA-RISC1.1 shared executable dynamically linked -not stripped
Bill Hassell
Honored Contributor

Re: bzip2 error - execute permission denied

> # bunzip2 offline_backup.tar.bz2
> sh: bunzip2: Execute permission denied.
> # bzip2
> sh: bzip2: Execute permission denied.

Whenever you have problems with executables like this, check to see what the shell is doing:

# type bunzip2 bzip2

Your /usr/local/bin directory permissions may have been changed:

# ll -d /usr/local/bin

And /usr/local/bin is not normally in your $PATH variable. Use this to show all the paths, one per line.

# for P in $(echo $PATH | tr ":" " ")
do
echo $P
done

Finally, what are the permissions for bunzip2 and bzip2?

# ll /usr/local/bin/b*zip2


Bill Hassell, sysadmin
Steven Schweda
Honored Contributor

Re: bzip2 error - execute permission denied

Note that on an HP-UX system, "Execute
permission denied." could mean missing
permissions, or an executable for a different
hardware architecture. For example, an IA64
executable on an IA64 system might work fine:

td176> uname -a
HP-UX td176 B.11.23 U ia64 1928826293 unlimited-user license

td176> file ./utility/source/zip/zip30h03_ia64/zip
./utility/source/zip/zip30h03_ia64/zip: ELF-32 executable object file - IA64

td176> ./utility/source/zip/zip30h03_ia64/zip
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
Zip 3.0h03 BETA (March 24th 2008). Usage:
[...]

While the same executable on a PA-RISC system
isn't:

td192> uname -a
HP-UX td192 B.11.11 U 9000/800 1839940656 unlimited-user license

td192> file ./utility/source/zip/zip30h03_ia64/zip
./utility/source/zip/zip30h03_ia64/zip: ELF-32 executable object file

td192> ./utility/source/zip/zip30h03_ia64/zip
sh: ./utility/source/zip/zip30h03_ia64/zip: Execute permission denied.

Same file, same (adequate) permissions, as
you can see:

td176> ls -li ./utility/source/zip/zip30h03_ia64/zip
4146020 -rwxrwxrwx 1 antinode 513 706972 Mar 25 15:42 ./utility/source/zip/zip30h03_ia64/zip

td192> ls -li ./utility/source/zip/zip30h03_ia64/zip
4146020 -rwxrwxrwx 1 antinode 513 706972 Mar 25 15:42 ./utility/source/zip/zip30h03_ia64/zip


But, on the IA64 system, if the permissions
were bad, ...

td176> chmod 644 ./utility/source/zip/zip30h03_ia64/zip

td176> ./utility/source/zip/zip30h03_ia64/zip
sh: ./utility/source/zip/zip30h03_ia64/zip: Execute permission denied.

Same complaint. Thus, the information in the
original question is not sufficient to tell
which of these potential conditions is
causing the problem.


A different OS in a similar situation might
provide more guidance. For example:

ALP $ run [.IA64L]ZIP.EXE
%DCL-W-ACTIMAGE, error activating image [.IA64L]ZIP.EXE
-CLI-E-IMGNAME, image file ALP$DKA0:[UTILITY.SOURCE.ZIP.ZIP30H04.IA64L]ZIP.EXE;1
-IMGACT-F-NOTNATIVE, image is not an OpenVMS Alpha image

But, if you're stuck with HP-UX, ...
Dennis Handly
Acclaimed Contributor

Re: bzip2 error - execute permission denied

>Steven: "Execute permission denied." could mean missing permissions, or an executable for a different hardware architecture.

That's why I asked for ll(1), file(1) and model(1). The latter is needed because some old PA-RISC machines don't support PA-RISC 2.0.
Steven Schweda
Honored Contributor

Re: bzip2 error - execute permission denied

> That's why I asked [...]

_I_ know that, but I thought that it might be
a mystery to the original questioner.

> The latter is needed because some old
> PA-RISC machines don't support PA-RISC 2.0.

This is news to me (but so many things are).
If such old systems can still run HP-UX
11.11, wouldn't it make some sense to offer
old-style binary kits for 11.11? Clearly,
GCC on my 11.11 system produced a
"PA-RISC1.1" executable, so it can't be too
difficult to make one.

By the way, the most simple-minded build of
GCC 4.3.0 ran straight through with nary a
complaint on my system, which was
unexpectedly pleasant. (At least after
getting the new prerequisite kits installed.)
I don't know how much of it works right, but
it was nice to see the build run to
completion instead of blowing up in the
middle of the Java jive, which was what I had
been seeings on previous 4.2.x kits.
Dennis Handly
Acclaimed Contributor

Re: bzip2 error - execute permission denied

>Steven: If such old systems can still run 11.11, wouldn't it make some sense to offer old-style binary kits for 11.11?

They are no longer sold and are discontinued but a few are still supported:
http://docs.hp.com/en/5991-6552/ch02s03.html

So, no it probably doesn't make economic sense.

>so it can't be too difficult to make one.

It is trivial but there is a significant performance boost by going to PA2.0. So if HP is asking Porting And Archive Centre to do the port it is probably asking for versions that run the fastest to benefit the must customers.
Ratzie
Super Advisor

Re: bzip2 error - execute permission denied

Sorry for late response I have been away.

# uname -a
HP-UX jaccare1 B.11.11 U 9000/800 1648137198 unlimited-user license

# model
9000/800/rp3440

# type bunzip2
bunzip2 is /usr/local/bin/bunzip2
# ll -d /usr/local/bin
drwxrwxr-x 2 bin bin 8192 Apr 6 15:32 /usr/local/bin

# ll /usr/local/bin/b*zip2
lrwxr-xr-x 1 root sys 5 Apr 6 12:22 /usr/local/bin/bunzip2 -> bzip2
-rw-r-xr-x 1 root sys 134708 Mar 22 2007 /usr/local/bin/bzip2

I am still having issues with this
Ratzie
Super Advisor

Re: bzip2 error - execute permission denied

UGGGGHHHH!

After a fresh set of eyes, and reading the replies, I installed the i64 bit version.

All is well!
Ratzie
Super Advisor

Re: bzip2 error - execute permission denied

Very much appreciated