?
Solved

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

Posted on 2013-10-26
2
Medium Priority
?
733 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 1500 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to implement server side field validation and display customized error messages to the client.
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

762 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