Name: Anonymous 2007-11-04 9:45
Hello /prog/,
I made a small Perl upload script. It works well otherwise, but i can, for example upload an cgi script thru it and execute it afterwards by opening the uploaded file in browser, even when i have
"chmod 0644, $filename"
in the script.
I wouldn't want to limit any file types wich can be uploaded, so how could i just chmod every file to be readable, but *not* executable in the server? All the files are owned by apache.
tl;dr: how does i chmod?
I made a small Perl upload script. It works well otherwise, but i can, for example upload an cgi script thru it and execute it afterwards by opening the uploaded file in browser, even when i have
"chmod 0644, $filename"
in the script.
I wouldn't want to limit any file types wich can be uploaded, so how could i just chmod every file to be readable, but *not* executable in the server? All the files are owned by apache.
tl;dr: how does i chmod?