Page 1 of 1

upload security & permission

Posted: Sun Apr 21, 2013 4:18 am
by aapalireza
if i ignore directory execute permission, can i upload every file even .php,.exe,... ???
is there any risk whit is???

Re: upload security & permission

Posted: Sun Apr 21, 2013 5:54 am
by requinix
The "execute" permission for directories is not actually for executing things. It's a misnomer.

Whatever the permission, someone can upload whatever files they want as long as your script allows it. If you don't want people to upload bad files then make sure they're only uploading good files (whatever those may be, like just images or just .doc files or whatever). What happens to uploaded files depends on your server configuration but in general yes: if they manage to upload a .php file then it can probably be executed just like any other PHP script you have.

Re: upload security & permission

Posted: Sun Apr 21, 2013 11:30 am
by social_experiment
an interesting read OP, will shed some light on your thoughts about what can be done if no checking / restriction is in place for file uploads
https://www.owasp.org/index.php/Unrestr ... ile_Upload