I had some issues making directories in php without doing 777 permissions. So I did this, first I wanted to find out what user was running apache, I know it is usually nobody, but I wanted to be sure so I did this:
ps -ef | grep apache
which returns:
www-data 15933 11814 0 06:54 ? 00:00:00 /usr/sbin/apache2
So I know my user is actually www-data, now I change the owner to www-data
x@x:/var/www/grid/sess$ sudo chown www-data scratch/ -R
x@x:/var/www/grid/sess$ sudo chmod 775 scratch/ -R
and now I can get it to write with 775 or 765 permissions! By the way I was writing my new PHP folders into this scratch folder
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment