How to Update the Default Umask for Apache/PHP

April 12, 2022 / How-to Guide

In this article, you will find how to update the Apache/PHP default unmask.

The umask command in Apache/PHP determines the permissions of newly produced files on the server. To alter the umask, you’ll need root access, which is only available on Dedicated hosting plans that don’t include Geeky features or a Performance Booster.

Open the following file to change the umask:

/usr/local/apache/bin/envvars

Add the following line within it:

umask 022

The default permissions for 022 will be established as a result of this. For the update to take effect, restart the Apache service on the server.

We hope you found it to be simple and straightforward. Please do not hesitate to contact eukhost customer service team.

Spread the love