Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Before posting new topics in this category K 1.5.x Support: Please read this first.

Question Avatar upload file permissions

More
15 years 11 months ago #47684 by rickert
Hi,

I've seen many threads reagarding problems with avatar upload but my specific problem does not seem to be addressed.

After uploading an avatar (default settings using GD2) the file permissions of the avatar imagefiles are set to 660 which causes the images not to be displayed.

If I manually change the permissions to 644 (or 664) the image is displayed.

What determines the setting of the filepermissions and what needs to be changed in order to upload images with filepermission set to 644?

Kunena 1.5.9 / Joomla 1.5.15

Any suggestion is appreciated,

Rick

Please Log in or Create an account to join the conversation.

More
15 years 11 months ago - 15 years 11 months ago #47715 by sozzled
G'day, rickert.

I am having a similar problem to yours ... on a website where I'm testing K 1.6! :ohmy:

Having read your problem I wonder my problem is caused by something in Kunena or Joomla or maybe how I've setup my site file structure.

Let me explain the symptoms of my problem to you and maybe we can help each other. :)

In Kunena 1.6 all images and attachments are located in the folder ../media/kunena/attachments/user-id/ and when you upload images, Kunena uses the image processor (for example, GD2) to store thumbnails of the images in ../media/kunena/attachments/user-id/thumb/.

When you upload avatar images in Kunena 1.5 they are stored in ../media/kunena/attachments/legacy/avatars/ and Kunena similarly uses the image processor (for example, GD2) to store thumbnails of the images in the same folder. Your images are stored as user-id.extension, for the full size, and 1-user-id.extension for the thumbnail (for example, 63.jpg and 1-63.jpg).

The curious thing is that when I upload images as message attachments the images are stored with a 660 permission, but the thumbnails are stored with a 644 permission. Strange, huh? :S
Last edit: 15 years 11 months ago by sozzled.

Please Log in or Create an account to join the conversation.

More
15 years 11 months ago #47718 by rickert
I'm still investigating.

Looks like generateAvatarGD is called from within myprofile_avatar_upload.php.

generateAvatarGD calls CKunenaFile::copy($tmpfile, $location) located in kunena.file.class.php

In here chmod 0777 or 0644 is executed but I wonder what happens if $FTPOptions == 0 or $ret === true.

Please Log in or Create an account to join the conversation.

More
15 years 10 months ago #50044 by sozzled
As a follow-up to this topic, we have overcome the issue that I was having in my K 1.6 testing. In my case it involved adding CHMOD function to adjust the file permissions after the uploaded images were stored and, although it was a different situation to that of the user, I was interested to know if enabling the Joomla FTP layer might have been involved ... or maybe something else.

We doubt that the Joomla FTP layer interacts with Kunena file uploads but this may require a lot more testing to prove that theory.

Please Log in or Create an account to join the conversation.

More
15 years 10 months ago #50045 by rickert
Hi Sozzled, I still did not solve my problem. Could you tell me where exactly this chmod should be added in Kunena 1.5 to try to solve my problem as well?

Please Log in or Create an account to join the conversation.

More
15 years 10 months ago - 15 years 10 months ago #50046 by sozzled
I don't know the solution for K 1.5. Theoretically-speaking, the technique used in K 1.5 involves the use of a JFile copy function - I don't know if it's native to Joomla or whether it was "doctored" by the Kunena developers - that should apply the correct file permissions retroactively after the file is in place on your site.

Some questions for you, that might help the developers to understand what's going on:

Do you have Joomla FTP layer enabled?
Do you have a valid FTP account/password stored at your site (assuming you have the FTP layer enabled)?
What if you create a whole new website, for testing purposes, with just Joomla 1.5.18, Kunena 1.5.11, stock-standard, make no changes, and see if the problem occurs on that test site? That's what I had to do (several times, in fact) to eliminate everything else that was going on.

It's possible that your problem might have something to do with your webhosting provider but let's look at that as a last resort.

Please don't leave this topic go unanswered for a month - we'll assume that you resolved it in that case. If you write that you are going to investigate further then let us know what you discover ... even if that means that you discover nothing. Thanks. :)

And finally ... for your own sake, for my sake, and for the sake of the many other users who are wondering why this is happening, please upgrade your website to K 1.5.11! You will also need J! 1.5.18 (if not for K 1.5.11, you'll need it for K 1.6 soon enough).

K 1.5.9 had a lot of problems. This is probably what is causing yours. ;)
Last edit: 15 years 10 months ago by sozzled.

Please Log in or Create an account to join the conversation.

Time to create page: 0.202 seconds