Loginskip to content

November 3rd, 2006

LOG=/var/log/httpd/error_log TAIL=10 echo “Content-type: text/plain” echo echo “Total

LOG=/var/log/httpd/error_log TAIL=10 echo “Content-type: text/plain” echo echo “Total number of lines = ‘wc -l $LOG’” echo tail -$TAIL $LOG 13.4 Basics To avoid those “Doh!” moments, make sure that Your program has the execute bit set on Unix systems. The penalty for missing this one isa 403Forbidden error, which is likely to make you think that the Web server can’t get into the enclosing directory instead. Your program has the correct #! line at the beginning. Getting it wrong will earn you a 500ServerError. Both of these problems are instantly detected by running the program from the command line on the Web server itself. If that works but you still get an error when coming through a Web browser, the permissions for the Web server user are set up incorrectly; contact the Web server administrator. 13.5 Security Not long ago, security was still considered optional by many people. Today that attitude is widely recognized as dangerous to others as well as oneself. The issue of security on the Internet has garnered universal attention, and one of the ways a host can be broken into is through a poorly written CGI program. Don’t let yours be one of them. 13.5.1 Taint mode Perl provides a powerful mechanism for securing your CGI programs. It’s called taint mode, and no program you put on the Web should be without it. You invoke it with the -T flag, making the first line of your scripts #!/usr/bin/perl -wT (Of course, the path to your perlmay differ.) Taint mode doesn’t actually do anything by itself to secure your program. What it does is force you to address every place where a security hole could occur. You see, the chief cause of security holes in CGI programs is malicious user inputs being used to affect things outside of your program. If you’ve never seen how easy this is, you’re in for a shock. Let’s say that your e-commerce Web site contains a feedback form for a user to input their e- mail address and a message of praise. Unfortunately, let’s say that your shipping department
Note: If you are looking for best hosting provider to host and run your tomcat application check Astra tomcat hosting services

Comments are closed.