Solved

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

Posted on 2013-10-26
2
721 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
ID: 39604085
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
ID: 39604732
this link solved the issue at http://httpd.apache.org/docs/current/howto/cgi.html

Thanks for your reply
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This article discusses four methods for overlaying images in a container on a web page
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
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…

772 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