matjazp Posted December 7, 2016 Posted December 7, 2016 When FileCompiler,php compiles a file, the permissions on the compiled file/directory at /site/assets/cache/FileCompiler/... is not correct. It's 0644 and not what I've set in /site/config.php with $config->chmodDir and $config->chmodFile I can overcome this by puting this in /site/config.php: $config->fileCompilerOptions = array( 'chmodFile' => $config->chmodFile, 'chmodDir' => $config->chmodDir, ); Now, I see that there is $config->fileCompilerOptions in /wire/config.php: $config->fileCompilerOptions = array( 'siteOnly' => false, // only allow compilation of files in /site/ directory 'showNotices' => true, // show notices about compiled files to superuser when logged in 'logNotices' => true, // log notices about compiled files and maintenance to file-compiler.txt log. 'chmodFile' => $config->chmodFile, // mode to use for created files, i.e. "0644" 'chmodDir' => $config->chmodDir, // mode to use for created directories, i.e. "0755" 'exclusions' => array(), // exclude filenames or paths that start with any of these 'extensions' => array('php', 'module', 'inc'), // file extensions we compile 'cachePath' => $config->paths->cache . 'FileCompiler/', // path where compiled files are stored ); But, isn't /wire/config.php read first, and then /site/config.php and thus my config settings are ignored? I guess it's expected that we should set specific fileCompilerOptions but I think it could be misleading if we setup proper chmod in /site/config.php and expect that this would be honoured?
horst Posted December 7, 2016 Posted December 7, 2016 I can confirm this! Have seen this yesterday and wanted to investigate a bit further, but haven't had time. Have you tried copying that block into site/config.php, after the part where you set other chmod values?
matjazp Posted December 7, 2016 Author Posted December 7, 2016 Yes, this is how my site config.php looks like: /** * Installer: File Permission Configuration * */ $config->chmodDir = '0770'; // permission for directories created by ProcessWire $config->chmodFile = '0660'; // permission for files created by ProcessWire $config->fileCompilerOptions = array( 'chmodFile' => $config->chmodFile, 'chmodDir' => $config->chmodDir, ); That's an installer issue, it should add those two settings in /install.php after line 716. 1
matjazp Posted December 7, 2016 Author Posted December 7, 2016 https://github.com/processwire/processwire-issues/issues/110 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now