LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-27-2007, 05:27 AM   #1
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Rep: Reputation: 52
CGI accessing files on hard drive


Are there special considerations to be aware of when accessing files on hard drive from a CGI script?

The script is written in pure assembly. The read and write sections work fine when tested as a normal program but work sporadically from the CGI program (called from an HTML form) even though the return of headers (the last step) works well.

Thank you for your help.
 
Old 04-27-2007, 05:32 AM   #2
mechdave
Member
 
Registered: Apr 2007
Location: Adelaide, Australia
Distribution: Ubuntu 8.10 and 7.10 server
Posts: 95

Rep: Reputation: 15
RE: CGI accessing files on hard drive

Quote:
Are there special considerations to be aware of when accessing files on hard drive from a CGI script?
Do you mean accessing files outside the root directory of the web server?
 
Old 04-27-2007, 10:32 AM   #3
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Original Poster
Rep: Reputation: 52
No, it is data files in the same directory (for testing purpose) than the CGI script.
I suspect there is no special consideration and my program has a bug.
 
Old 04-28-2007, 10:25 AM   #4
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Original Poster
Rep: Reputation: 52
The problem was permissions. I had forgotten the files were going to be read and written by the user defined in the apache configuration file.

A good link: http://www.cgi101.com/book/ch6/text.html
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying files from internal Hard drive to USB 2.0 Hard Drive is NOT Behaving tubatodd Ubuntu 4 02-19-2007 04:32 PM
accessing music files on windows NTFS hard drive moredhel Linux - Desktop 9 09-01-2006 01:00 AM
Accessing second hard drive? punchthemonkey94 Debian 2 05-28-2006 09:02 AM
Accessing Windows files on a seperate hard drive ickselglic Linux - Hardware 1 01-22-2005 06:13 PM
accessing win2k files from R.H 7.1 and vice versa that are on the same hard drive iquadri1 Linux - Networking 8 10-03-2001 10:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration