I'm setting up AWStats on my web server, which is hosted professionally. I have root access, but I'm using filezilla ftp to connect from my windows XP computer. How do I execute a .pl file on the server from my windows PC? I can't seem to figure it out.
Thanks if anyone can help
So you're able to log in OK? Do you have sudo su access?
Sudo su is a "pseudo" superuser. This is usually required to do any installs to the system.
Once you telnet/SSH in, you can **try** to execute sudo, type sudo su and press enter. If you're in the sudo'ers file, it will prompt you for a pass.
Whether that works or not, you need to get in the directory of the file you want to execute. You need to type the full path to it. And easy way is
locate myfile.pl
And it should print out all the paths to the files of that name on the system:
/var/www/html/cgi-bin/myfile.pl <-- EXAMPLE ONLY
Now SELECT the full path. This auto-copies into the putty buffer. Do not press ctrl-c! That is a windows command, ctrl-c will abort the current process.
To paste on the command line in the putty window, right-click with your mouse. In the following example, you'd type cd (space) then right-click to get the full command.
Now you can do one of two things
cd /var/www/html/cgi-bin/ (change to this directory)
perl myfile.pl (execute the proggie)
OR execute it from your current location
perl /var/www/html/cgi-bin/myfile.pl
Of course press enter after each.
You're likely to run into other issues, but that should keep you busy for a minute. :-)