if i ignore directory execute permission, can i upload every file even .php,.exe,... ???
is there any risk whit is???
upload security & permission
Moderator: General Moderators
Re: upload security & permission
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.
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.
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: upload security & permission
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
https://www.owasp.org/index.php/Unrestr ... ile_Upload
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering