Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

618 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