aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Apache problem with access to file !" Watch "Apache problem with access to file !" New topic
Author

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!

Regards,
Moniphal


<b>The more we learn, the more we know !</b>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache problem with access to file !
 
Similar Threads
problem with catching data with GET
Max Limit on characters in file name to use renameTo( ) in linux or windows?
Problem with access to file in Apache
unable to compile (calling C function from Java code)
How to use excel file in C program for file handeling?