Page 1 of 1

"default_upload_permission" in config not working

Posted: Wed Sep 12, 2012 12:27 pm
by davidhans
Hi. First-time poster so apologies if I've posted this in the wrong place.

Although my "default_upload_permission" is set to 644 in config.php, but when I upload a file via image manager or Tiny MCE the file permissions are defaulting to 664.

The _thumb.jpgs that are created simultaneously have the correct perms (644).

I recently upgraded to 1.11.1, and upgraded all my modules at the same time. My File Creation Mask is set to 022. I don't think I had a problem prior to upgrade

Any help would be appreciated. Do I need to post anymore info?

Re: "default_upload_permission" in config not working

Posted: Wed Sep 12, 2012 7:11 pm
by Dr.CSS
Try setting unmask to 002...

Re: "default_upload_permission" in config not working

Posted: Fri Sep 14, 2012 1:58 pm
by davidhans
Hi Dr CSS. Thanks for getting back to me. I tried setting the umask to 002 and then I used the image manager to create a folder and upload a file.

The new folder file permission is set to 775 (I want 755)
The file permission on both the image and its _thumb is 664 (I want 644).

Any other ideas?

Re: "default_upload_permission" in config not working

Posted: Mon Sep 24, 2012 4:51 pm
by davidhans
I notice Filemanager is behaving as I think it should (ie setting the permissions of newly uploaded files according to the
$config['default_upload_permission'] = '644'; in config.php), whereas imagemanager and tinyMCE create permissions of 664. Are the default perms for imagemanager and tiny set somewhere other than config.php?
After a previous hack, I've been warned by my server admin that file permissions should never be anything less than 644. I keep changing them, but every time my clients upload anything it has the "illegal" 664.