Php can not write files

Hello. I have a website running fine for months. Then I created a second virtual server and copied the same code to this new server. I’ve setup the whole server to work with the new domain and ssl certificates are also working. However php can not write any file to any directory. I have codes to generate profile pictures for example, or csv files and none of them are being generated.

I’ve checked its not a folder permission problem, all directories have 755 permissions. I’ve also checked apache logs and there are no errors. What should I do to diagnose the issue?

you running os? how did you install virtualmin it self? …any glues?

I’m running Ubuntu 16.04 and I installed with Automatic Method on fresh OS. What are glues?

It looks like a owner problem,
go to webmin/other/File Manager
Navigate to the folder of your website and check the ownership column.
is it root:root or is youraccount:youraccount?

It should be youraccount:youraccount

I reinstalled a fresh copy of virtualmin and its working now. I don’t know what the problem was.

Last time I checked ownership it was www-data:www-data due to the stuff I was trying out. I also thought it was ownership issue. But it didn’t work.

Anyways thanks for your input. If it happens again I’ll update the thread.