Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chrislee8

macrumors regular
Original poster
Jul 26, 2004
102
0
NY, NY
I got the lestest tomcat and extracted it /developer/application folder.

I tried to run startup.bat, but it says permission denied. i am the user who starts(bought and run installation) this machine. I don't know why I don't have permission to run some files.

Can anyone tell me how to debug and fix this problem? Thanks
 
Is the file executable? Open the Terminal and do an ls -l on the file. If there are no x characters in the permissions then it's not executable.
 
on startup.bat, it is -rw-r--r--

on startup.sh, it is -rwxr-xr-x

let me understand something, after the installation(extract and move to appropriate location), I should run startup.bat to start Tomcat. How can it be not permitted to be run?
 
startup.bat is for Windows, startup.sh is for *nix systems, OS X included.
 
chrislee8 said:
ok, in terminal, i run startup.sh. It comes back:

-bash: startup.sh: command not found.
Type "./startup.sh"

In *nix, your current working directory (denoted by ".") is not in your path by default (unless you add it in .bash_profile). Adding it to the path isn't recommended though. It's omitted for good security reasons. For instance, if I create a script and call it "ls", and get it somehow into your home directory, I can get you to run the script every time you type "ls" while you're in your home directory. But if "." is not in your path, the *nix command "ls" is run since *nix won't look for executables in your current working directory.

Edit: I forgot to mention, if you absolutely must add "." to your path, do it at the end, i.e. "export PATH=$PATH:.". That way, the current working directory is the last place *nix will look for executables. And definitely don't add to the path of an admin account or root if you have it enabled.
 
plinden said:
Type "./startup.sh"

In *nix, your current working directory (denoted by ".") is not in your path by default (unless you add it in .bash_profile). Adding it to the path isn't recommended though. It's omitted for good security reasons. For instance, if I create a script and call it "ls", and get it somehow into your home directory, I can get you to run the script every time you type "ls" while you're in your home directory. But if "." is not in your path, the *nix command "ls" is run since *nix won't look for executables in your current working directory.

Edit: I forgot to mention, if you absolutely must add "." to your path, do it at the end, i.e. "export PATH=$PATH:.". That way, the current working directory is the last place *nix will look for executables. And definitely don't add to the path of an admin account or root if you have it enabled.

it works, thank you.

how do i start tomcat as a service? I will look into the manual, but what the hell, i will appreciate any quick answer.

thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.