benphp Posted April 4, 2009 Share Posted April 4, 2009 I have a script that creates a txt file but doesn't work unless I set the directory to 777. Is it safe to do that? Link to comment https://forums.phpfreaks.com/topic/152497-is-it-safe-to-keep-a-directory-set-to-777/ Share on other sites More sharing options...
Maq Posted April 4, 2009 Share Posted April 4, 2009 I have a script that creates a txt file but doesn't work unless I set the directory to 777. Is it safe to do that? That shouldn't be the case, are you the owner? Link to comment https://forums.phpfreaks.com/topic/152497-is-it-safe-to-keep-a-directory-set-to-777/#findComment-800958 Share on other sites More sharing options...
benphp Posted April 4, 2009 Author Share Posted April 4, 2009 I'm the owner. I'm using <?php $fp = fopen($path.$_POST['signup'], 'w') or die("Sorry"); flock($fp, LOCK_EX); fwrite($fp, $string); flock($fp, LOCK_UN); fclose($fp); ?> which works on my windows dev box, but then when I upload it to my Linux server, it doesn't. I have to set the directory to 777. 775 doesn't work - other security settings didn't work. Link to comment https://forums.phpfreaks.com/topic/152497-is-it-safe-to-keep-a-directory-set-to-777/#findComment-800962 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.