Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Perl: chmod

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?

Name: Anonymous 2007-11-04 9:47

Oh, also forgot to mention, that the file(s) get chmodded, but they still get executed.

% ls -l upd/
-rw-r--r-- 1 apache apache    95 2007-11-04 13:55 test.cgi

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List