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

phpbb_chmod and crontabs setting incorrect permissions

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • 3.0.x
    • 3.1.12-RC1
    • Other
    • None
    • PHP Environment: 5.2.10
      Database: MySQL 5.0.81

    Description

      In the includes/functions.php file the function phpbb_chmod does not behave correctly when working with any kind of crontabs setup. While by default it works fine with the phpbb installation, if you setup any kind of crontab with that executes certain parts of the phpbb system then problems can arrise. For instance, in my case I have a crontab setup to execute the following line:

      pm_notification('post', $from_username, $user_ids, $pmrow['message_subject'], $pmrow['message_text']);

      When it accesses the pm_notification function it uses the phpbb_chmod function and writes to cache/queue.php. On my setup it would normally chmod 666 to queue.php in the cache folder. And it does normally when using phpbb through the browser. However, once you use the crontab it interprets user permissions wrong and instead does a chmod of 600 to the queue.php file. Then if a user through a browser performs an action that needs to write to the queue.php file it will instead fail as permission denied.

      I thought I would file this bug report in case you wanted to take into account members who use crontabs, and if in the future you ever use phpbb to use real crontabs. I know right now its not using real crontabs for automated tasks, but I believe in the future there may be some kind of move to using real crontabs and once that happens this bug will show up again for any default installations of phpbb.

      Attachments

        Activity

          People

            CHItA CHItA
            Bigwebmaster Bigwebmaster [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: