Images I upload are getting their permissions set to 600 by default. Thumbnails get set to 644, which is fine as they can still be read, but the original images are 600 so they can't be read.
I suspect it's a weird setting on my server now that the site is live (worked fine locally) but is there something I can do? Should there potentially be a check for this in the image upload function?
Uploaded images getting CHMOD 600
Started by Pete, Apr 03 2012 05:14 AM
2 replies to this topic
#2
Posted 05 April 2012 - 02:59 AM
I found the setting in the config file that sets permissions for uploaded files and this is now resolved.
I noticed when looking into this that some files got given good permissions 0644 and others got too few permissions 0600 (which must be an issue specific to my server as it was random) but why is this config option not turned on by default?
I'm not too bothered either way, but the actual line that uses it begins with an @ so it's not like it would throw an error if you enabled it in an environment that couldn't set it anyway.
Just curious. I'm just happy to have solved this one
I noticed when looking into this that some files got given good permissions 0644 and others got too few permissions 0600 (which must be an issue specific to my server as it was random) but why is this config option not turned on by default?
I'm not too bothered either way, but the actual line that uses it begins with an @ so it's not like it would throw an error if you enabled it in an environment that couldn't set it anyway.
Just curious. I'm just happy to have solved this one
#3
Posted 09 April 2012 - 10:38 AM
<p>Pete this should be enabled as a configuration option by default in your /site/config.php. Though I don't know why the server in your case is using different permissions. But take a look at these lines in /site/config.php just in case: </p>
<p> </p>
<p> </p>
<div><span>
<div> </div>
<p> </p>
<p> </p>
<div><span>
</span> <div><span>/** </span></div> <div><span> * chmodDir: octal string permissions assigned to directories created by ProcessWire</span></div> <div><span> *</span></div> <div><span> */</span></div> <div><span>$config->chmodDir = "0777";</span></div> <div> </div> <div><span>/**</span></div> <div><span> * chmodFile: octal string permissions assigned to files created by ProcessWire</span></div> <div><span> *</span></div> <div><span> */</span></div> <div><span>$config->chmodFile = "0666";</span></div> <span></span></div>
<div> </div>
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












