Image manager - strange permission problems 1.0.6/1.0.8

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
LeisureLarry

Image manager - strange permission problems 1.0.6/1.0.8

Post by LeisureLarry »

/uploads/images -> chmod 777
admin settings -> umask 022


Webspace 1 - cms ms 1.0.8:

upload image -> chmod 204
thumbnail -> chmod 640

new folder -> chmod 751
upload image in this folder -> chmod 204
thumbnail -> chmod 640

Deleting the thumbnail for testing.
Now cms ms is unable to generate a new thumbnail.

Changing image from 204 to chmod 644.
Now cms ms is able to generate the thumbnail again.
new thumbnail -> chmod 640

Problem is, I cannot see any thumbnails at this webspace in the image manager.
Changing the thumbnails to chmod 644, now I can see them.


Webspace 2 - cms ms 1.0.6:

upload image -> chmod 664
thumbnail -> chmod 640

new folder -> chmod 751
upload image in this folder -> chmod 204
thumbnail -> chmod 640

At this webspace I can see all thumbnails.


Would it be possible to fix the code in order to have all files with a chmod defined by the umask (644)?
cyberman

Re: Image manager - strange permission problems 1.0.6/1.0.8

Post by cyberman »

Have you tried to clear field umask completely?
LeisureLarry

Re: Image manager - strange permission problems 1.0.6/1.0.8

Post by LeisureLarry »

Deleted umask setting (empty now).

Webspace 1 - cms ms 1.0.8:

upload image -> chmod 204
thumbnail -> chmod 644 !!!

new folder -> chmod 755 !!!
upload image in this folder -> chmod 204
thumbnail -> chmod 644 !!!

I can see the thumbnails now, but the image chmod is still strange.

After trying to delete the image with the image manager it has the following privileges:
--w----r-T

And its still there (viewing via ftp, seeing image and thumbnail), but in the image manager it isn´t listed any longer.
Changing the image from 204 to chmod 644, I can delete it with the image manager.
Last edited by LeisureLarry on Fri Jul 06, 2007 1:30 pm, edited 1 time in total.
LeisureLarry

Re: Image manager - strange permission problems 1.0.6/1.0.8

Post by LeisureLarry »

I´m still having problems with the thumbnail generation.

After the thumbnails are created the original picture has the chmod 204. Even uploading the picture with a ftp client it has the chmod 204 after viewing its folder with the image manager of cms ms (thumbnail is created).

I think the creation itself causes the strange chmod, but couldn´t find a solution for it. Has anybody an idea how to solve this problem? I even tried umask 002 and 000, but with no change. This problem only occurs with one special webspace.

Greats from Germany
LeisureLarry
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Image manager - strange permission problems 1.0.6/1.0.8

Post by RonnyK »

I set umask to 002, this causes thumbnails and captch-images to be readable for viewers as well.

Ronny
LeisureLarry

Re: Image manager - strange permission problems 1.0.6/1.0.8

Post by LeisureLarry »

As I wrote, for me even umask 000 didn´t solve the problem. Does anybody know which code might cause this problem?
Last edited by LeisureLarry on Wed Jul 25, 2007 11:33 am, edited 1 time in total.
LeisureLarry

Re: Image manager - strange permission problems 1.0.6/1.0.8

Post by LeisureLarry »

As nothing solved my problem with the permissions of the original file set to 204 and I couldn´t fix this behaviour, I patched the thumbs.php (/lib/filemanager/ImageManager) for this special web server.

Above (around line 75):

//Check for NEW thumbnails

I added:

//Change permissions hack by JT
chmod($fullpath, octdec('0'.$config['default_upload_permission']));
chmod($thumbnail, octdec('0'.$config['default_upload_permission']));

Not the best hack, but it solves the problem and might help others having the same problem with their webspace.

Would be nice to have this in the standard CMS MS as it shouldn´t cause any problems.

Greats from Germany
LeisureLarry
Locked

Return to “CMSMS Core”