I have an Ubuntu server for a client I am working on, doing development work. I have root access and they created a new vhost blog.domain.com so when I log into it with WinSCP it list the files and there owners are Root user.

So now my PHP scripts are not able to write or do anything, what can I do or change to make my PHP scripts be able to read and write in this directory as they need?


Either change the owner to whatever httpd runs as (or whatever user php runs as in some cases); or make the folder other writable. Both are generally bad ideas, and there's virtually no reason your PHP scripts should be screwing with files in the first place. This is what databases were made for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy