file_put_contents permission denied causing error writing to file
I have a text file with chmod 777 in some directory: /a/b/example.txt I have a php script in another directory: /c/d/script.php Calling file_put_contents in the php script gives a permission error. The file, example.txt has chmod 777 and all its parent directories have 700 or 775. I believe executable permissions should be enough for the parents. This is the error message I get: Warning: file_put_contents(/home/a/b/example.txt): failed to open stream: Permission denied in /home/c/d/script.php on line 103 Error writing to example.txt I have looked around but haven't found a working solution. Hoping for some further suggestions of things to try.
Why are functions in cakephp 3.x controllers and tables public but functions in entities protected?
Instead of image file, I get the word “array” [duplicate]
Deactivate WooCommerce shop base
Php Date Conversion change
hhvm extension loaded but can't find function
Session being closed unexpectedly?
Order by a SQL left join on another left join
novice needs process array in class more efficiently
Really struggling with Paypal IPN
Woocommerce new product to external database using API
How to pass this code to codeigniter
Codeigniter distinct query not working
PHP: access to method of object with private constructor
Model id is overridden by related model
PHP video Uploaded file shows Black screen while playing
ACF (Wordpress) the_field doesn't work