• Post Reply Bookmark Topic Watch Topic
  • New Topic

Apache problem with access to file !  RSS feed

Ranch Hand
Posts: 48
  • 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!

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!