File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache problem with access to file !

 
Moniphal Say
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic