When you build a website on a Linux Web Hosting instance, your PHP program might automatically create a directory without write permission. As a result, you cannot write to that directory. This topic describes the cause and solution.
Symptom
You cannot write to a directory that is automatically created by a PHP program on your Linux Web Hosting instance.
Cause
By default, directories that are automatically created by a PHP program do not have write permission. You must enable the chmod function of PHP to grant write permission to the directory.
Solution
-
Log in to the Web Hosting console.
-
Find your Web Hosting instance and click Manage in the Actions column.
-
In the left navigation bar, select .
-
In the PHP Function Settings section of the PHP.ini Settings page, set the status of the PHP function
chmodto Enabled. -
Click Save Settings.
-
In the confirmation dialog box, click OK.
After the changes are saved, the PHP Function Settings area shows that the
chmodfunction is Enabled.ImportantEnabling the PHP
chmodfunction exposes your website to attacks, which can cause slow response times or access errors. Consult your website service provider before performing this operation. To maintain security, disable the PHPchmodfunction when it is no longer needed. -
Verify that you can write to the directory automatically created by the PHP program.
If the issue persists, submit a ticket.