Hi,
I've come across a problem trying to create new files and rename files on a Linux server through a cgi script - written in C. I seem to only be able to open existing files, read existing files and write to existing files when a script is executed by opening it on a browser (accessing cgi through internet). I can't seem to create a new file, nor can I rename an existing file through a cgi script, but I can do this with a normal C program on the server. I'm not a brilliant C programmer by any stretch of the imagination but I am generally competent, but still learning. I gather is has something to do with the settings for cgi-bin directory and programs executed from it? Or is it a standard I/O thing? Or am I wrong in both my guesses?
All I want to be able to do through my cgi script is create a new file on my server and rename it. Using fopen(filename, "w") - doesn't work, and how do you rename a file? Can anyone help me, your help will be much appreciated ! Been toiling over this for days !