php


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.

Related Links

Shuffle and randomize string without repeat in PHP
How to create a route with an appended path on a custom post type slug in Wordpress
Disabled/Enabled Field From Radiobutton When in Edit Mode
mysql selecting multiple rows in key value pair
Laravel routing with Closures and Names
Form sends each file in different email instead of all together
php - File location on server instead of $_FILES[“file”][“name”] (POST)
Variables Comparison PHP
sort() array of unique hexadecimal numbers (string-type): unexpected results
PHP in_array wildcard match
php imap_mail do not develiver email
If constructor overloading is not possible then how can i create objects with different parameters in PHP?
Calulating distance using cakephp
Install php on windows server2008r2
Check if two continous Uppercase letter exists php [closed]
how to check fields are exits or not in database using laravel

Categories

HOME
apache-nifi
gaming
jms
command-prompt
dafny
android-emulator
bing-search
google-play-services
tabs
google-webmaster-tools
gallery
liferay-7
capistrano
wine
reportviewer
stack-overflow
yahoo
azure-graph-api
cname
bootstrap-switch
multi-step
jodatime
distributed-computing
robolectric
susy-sass
angular2-highcharts
spring-ldap
unity-container
anova
kaggle
uislider
sipp
software-packaging
window-managers
cube
lxml
ms-media-foundation
creation
textmate2
love2d
identify
export-to-pdf
classnotfoundexception
icepdf
nomad
bit-shift
webalizer
password-hash
ilrepack
skip-lists
webvtt
mura
lvalue
apache-modules
maatwebsite-excel
qtextedit
system.net.mail
bbc-micro
powerpoint-2013
jemdoc
gulp-uglify
gwt-syncproxy
okta-api
odesk
phpquery
html.actionlink
google-maps-api-2
decidable
ambiguity
srv-record
360-degrees
karma-coverage
explain
dbmigrate
quercus
innerhtml
box2dweb
senchatouch-2.4
webaii
boinc
examine
handshake
email-verification
zend-pdf
live-wallpaper
workflow-manager-1.x
server-name
image-scanner
type-safety
fbml
expression-web
radscheduler
canonicalization
django-pagination
formal-semantics
external-sorting
eai
version-control-migration
acceleration
account-management

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile