Solved

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

Posted on 2013-10-26
2
724 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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 how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

730 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