[SOLVED]multiple upload image permissions question[/SOLVED]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
reidjazz

[SOLVED]multiple upload image permissions question[/SOLVED]

Post by reidjazz »

I am using the KFM File Manager so that I can upload more than one file at a time; I have also used, until recently, the File Manager listed in the Module Manager to do the same thing...upload multiple files. But as of CMSMS 1.1.1 (or so), when I upload more than one file (in my case, images), they get CHMOD 600 (instead of CHMOD 664), rendering them useless until I manually change this.

Why is this happening? I did not have this problem prior to CMSMS 1.1.1.

Help!!!
Last edited by reidjazz on Tue Nov 06, 2007 9:34 pm, edited 1 time in total.
alby

Re: multiple upload image permissions question

Post by alby »

reidjazz wrote: I am using the KFM File Manager so that I can upload more than one file at a time; I have also used, until recently, the File Manager listed in the Module Manager to do the same thing...upload multiple files. But as of CMSMS 1.1.1 (or so), when I upload more than one file (in my case, images), they get CHMOD 600 (instead of CHMOD 664), rendering them useless until I manually change this.

Why is this happening? I did not have this problem prior to CMSMS 1.1.1.
I remember that in 1.1.1 is changed the setting mode of umask field in General Settings with octdec (luckily)
Try with 002 umask in this field

Alby
reidjazz

Re: multiple upload image permissions question

Post by reidjazz »

alby wrote:
reidjazz wrote: I am using the KFM File Manager so that I can upload more than one file at a time; I have also used, until recently, the File Manager listed in the Module Manager to do the same thing...upload multiple files. But as of CMSMS 1.1.1 (or so), when I upload more than one file (in my case, images), they get CHMOD 600 (instead of CHMOD 664), rendering them useless until I manually change this.

Why is this happening? I did not have this problem prior to CMSMS 1.1.1.
I remember that in 1.1.1 is changed the setting mode of umask field in General Settings with octdec (luckily)
Try with 002 umask in this field

Alby
Alby,
Sorry, tried this, uploaded 2 images...and they were both set to CHMOD 600.

reidjazz
bterkuile
Forum Members
Forum Members
Posts: 97
Joined: Sun Jul 22, 2007 11:48 am

Re: multiple upload image permissions question

Post by bterkuile »

I looked at the KFM uploads rights and nothing is done. It is server handled. If you want to use and realy need custom rights (and are willing to hack into the system) you can change the following in the modules/kfm/kfm/uploads.php file.

On line 19 there is an else statement (my (newer) kfm version ). add the following below:

Code: Select all

chmod($to, 0644);
If many people have problems with rights I will build a standard rights system into KFM. I think it should have the form:

Code: Select all

chmod($to, 0666-$gCms->variables['umask']);
Or something like that. But I am no rights expert, so comment on this is welcome.
alby

Re: multiple upload image permissions question

Post by alby »

bterkuile wrote:

Code: Select all

chmod($to, 0666-$gCms->variables['umask']);
Try with:

Code: Select all

chmod($to, octdec('0'.$config['default_upload_permission']));
Alby
Last edited by alby on Fri Sep 28, 2007 10:29 am, edited 1 time in total.
reidjazz

Re: multiple upload image permissions question

Post by reidjazz »

bterkuile wrote: I looked at the KFM uploads rights and nothing is done. It is server handled. If you want to use and realy need custom rights (and are willing to hack into the system) you can change the following in the modules/kfm/kfm/uploads.php file.

On line 19 there is an else statement (my (newer) kfm version ). add the following below:

Code: Select all

chmod($to, 0644);
If many people have problems with rights I will build a standard rights system into KFM. I think it should have the form:

Code: Select all

chmod($to, 0666-$gCms->variables['umask']);
Or something like that. But I am no rights expert, so comment on this is welcome.
That seems to have done the trick...thank you very much!!!
reidjazz
bterkuile
Forum Members
Forum Members
Posts: 97
Joined: Sun Jul 22, 2007 11:48 am

Re: multiple upload image permissions question

Post by bterkuile »

This is now built in the new release of kfm. Also a setting for ImageMagick and cropping are available in the new release. (see notes).

Alby, thanks for your example, I based the fix in the new version on your example.

Benjamin
Locked

Return to “CMSMS Core”