stopfocus Posted January 10, 2010 Share Posted January 10, 2010 As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw enabled for the php group, so that fopen() can acces the Dir to write to it. When I try to write to the Dir that has permissions 666 I get the error "Permission Denied". If I try to write to the Dir and the permissions are set to 777 read/ write/ecexute for every one everything works as intended and fopen() write to the dir normally. My question: Why does a folder have to be executable for php to write to it using fopen()? (using up to date versions of Lamp on Debian Lenny 64-bit) Link to comment https://forums.phpfreaks.com/topic/187917-fopen-security/ Share on other sites More sharing options...
trq Posted January 10, 2010 Share Posted January 10, 2010 Setting a directory to executable means that it can be traveled into. Link to comment https://forums.phpfreaks.com/topic/187917-fopen-security/#findComment-992242 Share on other sites More sharing options...
stopfocus Posted January 20, 2010 Author Share Posted January 20, 2010 Its a bit paranoid but is there a way to make code in the folder un-executable but still writable by php? Link to comment https://forums.phpfreaks.com/topic/187917-fopen-security/#findComment-998461 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.