Php can not write files

5 posts / 0 new
Last post
#1 Wed, 03/21/2018 - 04:43
Vipul.K

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?

Wed, 03/21/2018 - 13:30
unborn
unborn's picture

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

Configuring/troubleshooting Debian servers is always great fun

Thu, 03/22/2018 - 01:09
Vipul.K

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

Thu, 03/22/2018 - 08:11
metrics

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

Thu, 03/22/2018 - 09:54
Vipul.K

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.

Topic locked