<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in init_creationmodes.test.php</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2025</copyright>
    <generator>Java</generator><item>
        <title>bd5391243cdd92d9e0abee5ba1a506170b18d072 - :fire: fix the calculation of file permissons</title>
        <link>http://127.0.0.1:8080/history/dokuwiki/_test/tests/inc/init_creationmodes.test.php#bd5391243cdd92d9e0abee5ba1a506170b18d072</link>
        <description>:fire: fix the calculation of file permissonsOur config allows to set the values for `dmode` and `fmode` to allowusers to explicitly define which permissions directories and filesshould have.To avoid unnessary chmod operations, we check the current umask tocompare what permissions files and directories would get witout ourintervention. If the result is already what the user wants, no chmodswill happen later on. Otherwise we set new configs called `dperm` and`fperm` which will be used in chmod ops. This is done in`init_creationmodes()`When we created new directories, we used to pass the original `dmode`config to `mkdir()`. The system will then apply the umask to that`dmode`.This means the resulting directory will *always* have differentpermissions than `dmode`, *always* requiring a chmod operation.That&apos;s silly.**Breaking Change:** This patch removes the passing of `dmode` assecond parameter to all `mkdir` calls, making it default to `0700`which is also what we test against in `init_creationmodes()`.Plugins not relying on our `io_*` functions and do create their owndirectories and which currenlty pass `dmode` to it need to beadjusted to remove that second parameter.Users may want to reapply the proper file permissions to their datafolder.**Revert:** In 9fdcc8fcd87114ca59a1764a84d213a53c655c8c @movaticaintroduced a change to `init_creationmodes()` that compared the umaskagainst `fmode` instead of `0666`. I merged it because it looked logicalwhen compared to the code for directories which compared against `dmode`as described above. However we do not pass `fmode` to any file creationmethods (that&apos;s not possible).The result is that all changes made in the `fmode` setting resultedin the wrong permissions for newly created files as first reported inhttps://forum.dokuwiki.org/d/19463-setting-fmode-not-working-as-intendedI&apos;m unsure about the orginal motivation behind @movatica&apos;s change. The&quot;fix&quot; however, is wrong.**Tests:** This patch introduces an integration test that will check theactual results of directory and file creations under various umask,`dmode` and `fmode` settings.

            List of files:
            /dokuwiki/_test/tests/inc/init_creationmodes.test.php</description>
        <pubDate>Sat, 14 Aug 2021 09:06:31 +0000</pubDate>
        <dc:creator>Andreas Gohr &lt;andi@splitbrain.org&gt;</dc:creator>
    </item>
</channel>
</rss>
