Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

setFolderName creates 644 not 755 permission?

Go to End

3 Posts   967 Views


Community Member, 182 Posts

23 August 2013 at 12:23am

When using setFolderName like this:

$fields->addFieldToTab('Root.ProjectImages', $thumbField = new UploadField('ProjectThumb','Main Thumbnail'));

My uploads return a 403 error as the folder created only has 644 permissions and not 755. The upload works but just shows a question mark in the thumbnail box..
I can manually change the permissions my self but this is not practical for other users etc.

How can I fix this thanks?


Community Member, 187 Posts

23 August 2013 at 10:23pm

As far as I'm aware the default is to create folders with 755 permissions:

Is this on your development server, or could it be an issue with the web host?


Community Member, 182 Posts

23 August 2013 at 10:34pm

That's what I thought, and its not been an issue before. But after speaking to the host 123-reg (who are a terrible choice for SilverStripe but I had no choice) they say its nothing to do with them..
I did look into setting a yaml file to force it to 755 but didn't work it out.

Its on a live host so probably something to do with their settings.. It does not cause an issue on my developing server...