1

I'm trying to configure Tomcat on my server. I have short instruction:

# /usr/local/psa/admin/sbin/tomcatmng --install-psa
# /usr/local/psa/admin/sbin/tomcatmng --is-configured
yes

it's all, but I can't do that.

When I'm in sbin, command cd tomcatmng returns

tomcatmng: Not a directory

But when I write in cmd ls I see this. What is wrong ? I'm trying also paste this in sbin:

tomcatmng --install-psa

but also error, now command not found.

What is wrong ?

ls - l in sbin

-rwxr-x--- 1 root root      70232 Mar 17  2017 tomcatmng

2 Answers2

1

tomcatmng does not seem to be a directory at all. It could not be called with parameters as the instructions suggest and the ls -l will be different for a directory. So I assume it’s more likely a command to be executed.

The # as the first character on command lines in the instructions indicates the commands shall be executed by root (opposed to $).

The same is also indicated by your ls -l output. The x in the permission column is present for the owner and group which are root and root according to the following columns. No other user is allowed to run this command.

In Ubuntu, the easiest way to run a command as root is to prepend sudo, i.e.

sudo /usr/local/psa/admin/sbin/tomcatmng --install-psa

I'm trying also paste this in sbin:

tomcatmng --install-psa

Commands in the current directory must be moreover prefixed with ./, this is a security measure.

Melebius
  • 11,750
0
echo $PATH

on your PC, and you will probably find /usr/local/psa/admin/sbin/ is not in there. If the program needs to just be executed, then:

chmod 700 tomcatmng

and type:

./tomcatmng
Stephen Rauch
  • 1,156
  • 6
  • 15
  • 21
john smith
  • 3,161