Enable php to create directories in sub-server that being created by API virtualmin

2 posts / 0 new
Last post
#1 Thu, 10/15/2015 - 09:06
visiomic

Enable php to create directories in sub-server that being created by API virtualmin

Hello,

I use the API virtualmin to create sub-servers on my domain and everything works fine. This allows me to create sub-server directly from my backoffice.

However, when I want to create directories on new sub-servers, I'm not allowed. Unless I manually do a chmod 777 to publuc_html on my new sub-server (which I do not want).

Is it possible to authorize my php to create directories and files automatically without manual intervention ?

Thanks for your help

Thu, 10/15/2015 - 11:23
andreychek

Howdy,

By default PHP should indeed be able to create directories, as it runs as the Virtual Server owner.

Do you know if the PHP Execution Mode was perhaps changed to mod_php?

If it's been changed to mod_php (the default is FCGID), that would indeed cause that problem, as mod_php runs as the Apache user, rather than the Virtual Server owner.

-Eric

Topic locked