[solved] Permission issues between uploads and thumbnails
Posted: Sat Oct 11, 2008 4:19 pm
[solved]
Nevermind. It was a slightly older version of CMSMS. I deleted all the CMSMS php dirs and php files, and did a new install. I did not create tables or install sample content. Once it was up and running, I reinstalled my modules, and after a few tweaks all was working.
[/solved]
I have a website that I have moved to a new server. This new server uses suPHP (the old one didn't) so I'm going through a bit of a learning curve here.
suPHP, for those who aren't familiar, runs php as a cgi, so PHP is run with the permissions of the user, not apache. Additionally, php will not execute if permissions are too high. I belive 755 on directories and 644 on files is the max.
Anyway, I'm having a problem when uploading images using image manager. If I set umask in Site Admin > Global Settings to 022, uploaded images get the expected 644 permissions. But, generated thumbnails get 640, which means they can't be viewed in the /admin.
To get thumbnails to have 644, I have to set umask to 002, but then uploaded images have 664.
Site Admin > Global Settings has:
File Creation Mask (umask): 022
Config.php has:
$config['default_upload_permission'] = '644';
/opt/suphp/etc/suphp.conf has:
;Umask to set, specify in octal notation
umask=0022
My question is, how do I get uploaded images, and generated thumbs, to have the same permissions (644).
EDIT:
CENTOS Enterprise 4.7, php5, mysql 5.0.51a, apache 1.3.41.
Nevermind. It was a slightly older version of CMSMS. I deleted all the CMSMS php dirs and php files, and did a new install. I did not create tables or install sample content. Once it was up and running, I reinstalled my modules, and after a few tweaks all was working.
[/solved]
I have a website that I have moved to a new server. This new server uses suPHP (the old one didn't) so I'm going through a bit of a learning curve here.
suPHP, for those who aren't familiar, runs php as a cgi, so PHP is run with the permissions of the user, not apache. Additionally, php will not execute if permissions are too high. I belive 755 on directories and 644 on files is the max.
Anyway, I'm having a problem when uploading images using image manager. If I set umask in Site Admin > Global Settings to 022, uploaded images get the expected 644 permissions. But, generated thumbnails get 640, which means they can't be viewed in the /admin.
To get thumbnails to have 644, I have to set umask to 002, but then uploaded images have 664.
Site Admin > Global Settings has:
File Creation Mask (umask): 022
Config.php has:
$config['default_upload_permission'] = '644';
/opt/suphp/etc/suphp.conf has:
;Umask to set, specify in octal notation
umask=0022
My question is, how do I get uploaded images, and generated thumbs, to have the same permissions (644).
EDIT:
CENTOS Enterprise 4.7, php5, mysql 5.0.51a, apache 1.3.41.