Jump to content


Photo

Uploaded images getting CHMOD 600


  • Please log in to reply
2 replies to this topic

#1 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 658

  • LocationChester, England

Posted 03 April 2012 - 05:14 AM

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?

#2 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 658

  • LocationChester, England

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 :)

#3 ryan

ryan

    Hero Member

  • Administrators
  • 5,812 posts
  • 3140

  • LocationAtlanta, GA

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&#39;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>
</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 = &quot;0777&quot;;</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 = &quot;0666&quot;;</span></div>
<span>
</span></div>
<div> </div>





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users