Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > Apache Help

Apache Help Post any question relating to Apache here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-04-27, 01:14 PM
Junior Member
 
Join Date: Apr 2007
Posts: 1
ischultz is on a distinguished road
Default Perl script inherited permissions

I am currently trying to code a perl script that will get the directory listing of a folder I'm hosting with Apache. The problem right now is with the way I have my server set up. In the httpd.conf, for the directory I want the perl script to be able to list all files and folders, I'm using the following rules:

Options +ExecCGI
AddHandler cgi-script cgi pl
<Files ~ "\.(mp3)$">
Order allow,deny
Deny from all
</Files>
Satisfy any
Allow from all

I have authentication set up so that when a user logs in, they are able to see all files and directories. If they are an anonymous user, I want to hide files from them within the directory. But therein lies the problem - my perl script doesn't get handed the permissions of the authenticated user, so when i use the get() command to get the directory listing, it returns back a page that is hiding the mp3 files (in this example.) So what I'm wanting to know is whether there is some rule/option/environmental that will allow the perl script to properly use the get() command with the right permissions. I don't know if there is an easier way to do what I'm trying to do, but I suppose I could have the perl script access the file system, instead of using get() and going through apache.. but this way was much easier as it is only one line of code.

Thanks, and sorry if that was confusing - I'm fairly new to all of this
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:54 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.