Closed
Description
Description
Permissions applied to files with PHP extension from the operating system are not applied immediately, it is necessary to restart the operating system.
- Create one file called anything.php with 644 or 755 permissions and put it in any web server root directory.
- Read the file anything.php from your web browser. (We can see the file content).
- Change the permissions file to 000 and refresh your web browser (We can still see the file content).
- After restarting the operating system, it is not possible to see the contents of the file.
- Change the permissions file to 655 or 755 and refresh your web browser (We can see the file content).
- Repeat the step 3 and you will get the same result.
This occurs in versions 7.4.x through 8.x.x versions and only with files with PHP file extension. These tests were performed on Rocky Linux 8.x and Rocky Linux 9.x, Alma Linux 9.1 and Ubuntu Server 20.04 with Apache and NGINX web servers installed. Only works properly in PHP versions 7.2 and 7.3
PHP Version
PHP 8.2.4
Operating System
Rocky Linux 8.x and Rocky Linux 9.x, Alma Linux 9.1 and Ubuntu Server 20.04