telephone / LookingGlass

A user-friendly PHP Looking Glass
MIT License
1.25k stars 345 forks source link

Installs fine, but not all commands available #15

Closed wizygr closed 9 years ago

wizygr commented 11 years ago

Installed on CentOS 6 with PHP 5.3.25 using Apache 2.2.15.

'host' and 'traceroute' commands give results just fine. However 'mtr' and 'ping' commands, don't. The results box is displayed almost immediately after pressing the button but it is empty. I would expect an error message...

Both utilities are also normally installed:

[root@host lg]# l /usr/sbin/mtr ; l /bin/ping -rwsr-xr-x. 1 root root 59384 Aug 17 2010 /usr/sbin/mtr -rwsr-xr-x. 1 root root 40760 Jun 5 13:39 /bin/ping

Any ideas on how to debug this further?

Thanks in advance.

brendancarlson commented 11 years ago

Do you have those commands installed on the machine you are running this on?

wizygr commented 11 years ago

Yes, of course and they are running fine from the console. However they produce no output when running through the webpage...

Any help would be appreciated.

brendancarlson commented 11 years ago

If you post a link to where you are hosting this page I can take a look and help you. :)

bpvarsity commented 10 years ago

I am having the same issue. Commands work via command line but nothing outputs on the web version.

http://m9.androidfilehost.com/

No output from any tool.

Any ideas?

abyssis commented 10 years ago

Could be related to permissions.

bpvarsity commented 10 years ago

Ya not sure what to check. I've changed a few files permissions but no change. Owner/group doesnt seem to fix it either.

Also upgraded to php 5.4.26 but didnt fix it either

abyssis commented 10 years ago

Might as well be related to network configuration. What type of control panel do you use? Is it SolusVM?

bpvarsity commented 10 years ago

This vps is on a Proxmox server running as a openvz container

abyssis commented 10 years ago

What type of OS?

bpvarsity commented 10 years ago

Centos 6 x64

abyssis commented 10 years ago

Were there any errors while installing the whole thing? Try to remove the entire directory and download/run the script again.

I remember running into into similar issue back then, but my problem was related to the network configuration.

bpvarsity commented 10 years ago

Nope no errors and I have redone the install multiple times. Also have tried removing the whole directory and installing again.

Not sure what is causing it. Everything is working great on the vps. Just made it this morning. This seems to be the only thing not working.

Very odd.

bpvarsity commented 10 years ago

Looks like development haulted on the v2. Still under dev and hasn't been touched in a year.

Would like to get this one working. Will be very handy to help diagnose issues with the users.

bpvarsity commented 10 years ago

Anyone know of another script like this one I can try? Give up on this one for now.

abyssis commented 10 years ago

Have you installed this script using sudo or root access?

bpvarsity commented 10 years ago

I installed it as root

abyssis commented 10 years ago

Try to ask here: http://lowendtalk.com/

telephone commented 10 years ago

@bpvarsity Your issue is more than likely caused by permission errors. That is, your 'www' user cannot access the commands as they're set to require root-privileges.

Here's an example on how to fix:

# chmod u-s /bin/ping
# setcap cap_net_raw+ep /bin/ping

# chmod u-s /bin/ping6
# setcap cap_net_raw+ep /bin/ping6

# chmod u-s /bin/traceroute
# setcap cap_net_raw+ep /bin/traceroute

# chmod u-s /bin/traceroute6
# setcap cap_net_raw+ep /bin/traceroute6

You may be able to fix the problem by only using the chmod command, but if you need the setcap you'll need to install libcap first.

For Ubuntu I fixed the permission errors by running "sudo chmod u+s which ping" for the necessary commands.

bpvarsity commented 10 years ago

Thanks for the response. Still not working on centos. hmm

Ill keep playing with it. Ill try it on another vps like this one and see if it works or does the same thing.

chandro commented 10 years ago

i have installed it on 5 servers and is working ok, on centos.

i didnt have anything else, because is just for lookingglass

bpvarsity commented 10 years ago

I got centos to work with lookingglass. It was a issue with the control panel installed on the server.

Not able to get the commands to work on gentoo with nginx. Anyone have any luck with gentoo?

Thanks

osmanmakal commented 10 years ago

You probably don't disable SELinux

Please use this command for CentOS 6: setenforce 0

shenyqwilliam commented 10 years ago

Should be SELinux permission problem. It pings well on all my CentOS 6 vps, but couldn't ping on any of my CentOS 7 vps (RHEL7 is SELinux enforced).

I don't like the idea to turn SELinux all off. But I haven't figured out which values should be changed using setsebool command.