Solved

Set permission right to run  all linux directory for all CGI/perl file

Posted on 2013-10-26
2
713 Views
Last Modified: 2013-12-25
Dear Experts,

I would like to set permission right to all linux directory for executing all
CGI/perl file such as example.cgi . Why my all  php script I can run it at
all directory ?  That must be set for permission by my hosting system adminstrator
in httpd.conf file, Right ?
 Now how to do the same for perl script file as php script which is  able to run at
all my linux directory ?
Now I'm just  able to run cgi/perl file at my public_html /cgi-bin/  only, Why ?
 The  issue is not related to chmod 755 that can not solve it since I tried it before and not
working.
Is it related to httpd.conf or alias setting ? please advise

Now if I run cig/perl script at other than /cgi-bin directory it will report error
such as follows

Forbidden

You don't have permission to access /data/pl/example.cgi on this server.


Please advise

Duncan

Example.cgi
#!/usr/bin/perl
print "Content-type: text/html\r\n\r\n";
use strict;
use warnings;

print "hi NAME\n";

Open in new window

0
Comment
Question by:duncanb7
2 Comments
 
LVL 12

Accepted Solution

by:
junipllc earned 500 total points
Comment Utility
This is dependent upon how the Apache server is set up. For security reasons, many installations only allow you to run CGI scripts from a specified directory. Your best bet is to contact your hosting provider and see if they can change the settings. I don't know if they will do it, but it can't hurt to ask.

Cheers,

Mike
0
 
LVL 13

Author Closing Comment

by:duncanb7
Comment Utility
this link solved the issue at http://httpd.apache.org/docs/current/howto/cgi.html

Thanks for your reply
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now