File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Apache problem with access to file ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Apache problem with access to file !" Watch "Apache problem with access to file !" New topic

Apache problem with access to file !

Moniphal Say
Ranch Hand

Joined: Aug 11, 2004
Posts: 48
Dear all,

I develop one file broswer which using CGI programming in C and use apache as the server.

My browser will browse into the directory and user can view the file, edit delete and save. My problem is that : I can not access to file to open even for reading.
My CGI program is placed in the "/var/www/cgi-bin/". Actually I can only open and read the directory "/tmp" but I can not access to file in this directory.
I have set all the permission to the file , " chmod 777 filename " but still I can not open and read.
If I run my program in other directory , I will work.I can open and read the file.

My code to view file :

and it always show "The file is not readable!!!"

I'm using Fedora Core3, my friends who use Debian.. they can access to the file and read it. So I think it's OS problem but I really dont know how to solve it.

I would appreciate your help!


<b>The more we learn, the more we know !</b>
I agree. Here's the link:
subject: Apache problem with access to file !
It's not a secret anymore!