Page 1 of 1

Image manager - strange permission problems 1.0.6/1.0.8

Posted: Fri Jul 06, 2007 11:44 am
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)?

Re: Image manager - strange permission problems 1.0.6/1.0.8

Posted: Fri Jul 06, 2007 11:48 am
by cyberman
Have you tried to clear field umask completely?

Re: Image manager - strange permission problems 1.0.6/1.0.8

Posted: Fri Jul 06, 2007 12:22 pm
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.

Re: Image manager - strange permission problems 1.0.6/1.0.8

Posted: Wed Jul 25, 2007 9:15 am
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

Re: Image manager - strange permission problems 1.0.6/1.0.8

Posted: Wed Jul 25, 2007 9:31 am
by RonnyK
I set umask to 002, this causes thumbnails and captch-images to be readable for viewers as well.

Ronny

Re: Image manager - strange permission problems 1.0.6/1.0.8

Posted: Wed Jul 25, 2007 9:37 am
by LeisureLarry
As I wrote, for me even umask 000 didn´t solve the problem. Does anybody know which code might cause this problem?

Re: Image manager - strange permission problems 1.0.6/1.0.8

Posted: Thu Sep 06, 2007 11:46 am
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