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.

Archive /

Our old forums are still available as a read-only archive.

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

Default umask.

Go to End

3 Posts   2585 Views


Google Summer of Code Hacker, 6 Posts

10 April 2007 at 12:20pm

Some parts of SS use functions that depends on umask value i.e. mkdir. As long as you don't change default value it's ok but if you change ...It can lead to some strange permission problems that aren't easy to debug(I spend some time debugging it). Would it be possible to set default umask in the index.php or in other equivalent place ? .


Forum Moderator, 628 Posts

11 April 2007 at 7:37pm

This is a good point and is an example of something that doesn't give us too many issues on our own production environments but is something to resolve.

I'm assuming the problems you talk of is when the apache user (e.g. "www-data" or "nobody") is different the user that you edit files as (e.g. your FTP login to a webhosting environment). You can do things like (in linux command line) set a sticky group bit on the 'assets' folder to ensure that subfolders are created with good permissions...

When you say "would it be possible" are you enquiring whether this is a PHP or SilverStripe function that already does this, or suggesting that we provide some sort of means for this?


Google Summer of Code Hacker, 6 Posts

13 April 2007 at 8:49am

I think problem is caused by strange umask for i.e "nobody" user that I changed manually and forget about it(it’s really odd to do that). I meant by saying "would it be possible" that SS could set default umask value i.e 022 using umask function in index.php