I have a problem with a cgi script not being allowed to create/write to a txt file.
The Scenario:
A Linux/Apache server with SeLinux disabled (temporarily)
A cgi script that creates a new txt file containing info submitted by a visitor (ipaddy_data.txt)
When I load the cgi in my browser, I get an "Internal Server Error". Looking at my error log tells me "Permission denied at line 13". This is where the script is supposed to create the file. (my $logpath = "data/$remote-addr_data.txt"; ). If I "rem" out everything to do with creating that file, it works great. No errors.
What have I done to try to fix this?
I have chowned all folders to root:root (cgi wouldn't work at all any other way I tried). I have chmoded all existing files to 777. And I have disabled SeLinux.
Now, what in the world am I not seeing here?
Any help with this is greatly appreciated. Also, if any more info is required, please ask.
The Scenario:
A Linux/Apache server with SeLinux disabled (temporarily)
A cgi script that creates a new txt file containing info submitted by a visitor (ipaddy_data.txt)
When I load the cgi in my browser, I get an "Internal Server Error". Looking at my error log tells me "Permission denied at line 13". This is where the script is supposed to create the file. (my $logpath = "data/$remote-addr_data.txt"; ). If I "rem" out everything to do with creating that file, it works great. No errors.
What have I done to try to fix this?
I have chowned all folders to root:root (cgi wouldn't work at all any other way I tried). I have chmoded all existing files to 777. And I have disabled SeLinux.
Now, what in the world am I not seeing here?
Any help with this is greatly appreciated. Also, if any more info is required, please ask.