Skip to content

Failure to apply permissions to files with PHP file extension in GNU/Linux #10986

Closed
@Ravenman

Description

@Ravenman

Description

Permissions applied to files with PHP extension from the operating system are not applied immediately, it is necessary to restart the operating system.

  1. Create one file called anything.php with 644 or 755 permissions and put it in any web server root directory.
  2. Read the file anything.php from your web browser. (We can see the file content).
  3. Change the permissions file to 000 and refresh your web browser (We can still see the file content).
  4. After restarting the operating system, it is not possible to see the contents of the file.
  5. Change the permissions file to 655 or 755 and refresh your web browser (We can see the file content).
  6. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions