Jump to content

Uploaded images getting CHMOD 600


Pete
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

</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>

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...