Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14327

phpbb_chmod creating files that cannot be accessed.

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1.6
    • Fix Version/s: None
    • Component/s: Caching (ACM)
    • Labels:
      None
    • Environment:
      PHP Version 5.3.29, MySQL 10.0.22-MariaDB

      Description

      I am having an issue with the cache that I believe is caused by a bug with the phpbb_chmod function.

      Occasionally, I will have a file in the cache folder that has owner / group information different from all the other cache files. These cache files will also have a permission setting of 0600. Once the file has the different owner and group, and a setting of 0600... I believe it is unable to be accessed again by the cache, which is creating problems.

      Looking at the phpbb_chmod function, I believe it is capable of changing ownership on a cache file (or any file) prior to setting a permission chmod, which can then make it impossible to set the chmod permission. It uses whatever owner / group controls the 'common.php' file. This could be more problematic if the common.php file had been uploaded with a different account (such as root).

      I believe further development to the phpbb_chmod function needs to occur to at least prevent it from changing ownership prior to updating permissions, if the permissions are such that it won't be accessible again (0600, etc).

      Also. It is not readily understood why only some files in the cache have these weird permissions. Most have the default (nobody:nobody) owner / group, and have 666 as the permission. When this happens and a cache file cannot be accessed, it can crash the style data, which causes the board to become unresponsive with the error 'Could not obtain style data.'.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Ectoman AJ Quick
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: