linux - PHP file permission errors -
i have folder php uploads located in directory above www (/home/user/upload). have made folders permissions 770 , made custom group, includes user apache , nobody, own it.
when chgrp mygrp upload, php able upload it, after 1 time... of sudden can't write or read anymore...
anyone have ideas?
====edit====
here code i'm using dl remote file:
$ch = curl_init($url); $image = tmp_dir.'/'.getrandomstring(10).".{$info->extension}"; while (file_exists($image)) $image = tmp_dir.'/'.getrandomstring(10).".{$info->extension}"; $image_handle = fopen($image, 'w'); curl_setopt($ch, curlopt_file, $image_handle); if (curl_exec($ch) === false) throw new exception('curl error: '.curl_error($ch), curl_errno($ch)); curl_close($ch);
well feel bit stupid now... after adding , changing users , groups never restarted php or apache. if else ever has problem make sure first.
thanks time , guys!
Comments
Post a Comment