Forum Moderators: coopster & phranque

Message Too Old, No Replies

Output text file from data entered into HTML form to cgi

         

c55dax

12:56 am on Apr 1, 2003 (gmt 0)

10+ Year Member



If someone sets up a cgi script to write data that is entered into a HTML form into a text file- questions:

Does the text file need to be set to 666 permission for this to work and if so is this a security concern;
Does the text file need to be in cgi-bin folder?
How can this be set up for the least security concerns?
How do most sites now handle collecting data from an online form?

marcs

1:02 am on Apr 1, 2003 (gmt 0)

10+ Year Member



Does the text file need to be set to 666 permission for this to work and if so is this a security concern;

Most scripts will need 666 or similar on data files. The security concern is that all other users on the same server can write to the file (modify it) in those cases.

Does the text file need to be in cgi-bin folder?

No (but it can be). Tell your script the full path of the data file and you should be fine.

How can this be set up for the least security concerns?

You could set SUID/GUID bits on the script if it is a binary or use a cgi wrapper. That basically makes the script execute as the user who owns it and removes to need to open the data file open to others on the same server.

How do most sites now handle collecting data from an online form?

Many different ways are used, including ASCII files.

ShawnR

1:42 am on Apr 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I wonder if there is a record for the fastest complete and correct response to a request for help ;-)

(Jatar, I hope you will forgive this slightly off topic post.)

Shawn

jatar_k

4:38 am on Apr 1, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



How do most sites now handle collecting data from an online form?

comma delimited file
text file
database
email

and anything else you can think of. I usually use csv or db in conjunction with an email. It just works for the way I do things. It also depends on how much/what type of data you are dealing with and what you plan on doing with it afterwards.

by the way, if not previously offered
Welcome to WebmasterWorld c55dax

and no prob ShawnR, I have no idea, I have seen faster but not much ;)