jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.0 => Bugs! => Topic started by: Tom68 on 07.06.2025 15:35:41

Title: admin/src/Table/DownloadTable.php: 1137 - Permission 0655
Post by: Tom68 on 07.06.2025 15:35:41
Joomla 5.3.1
jDownloads 4.0.47

Colin & Arno,

I found another permission issue in the file "admin/src/Table/DownloadTable.php: 1134-1143".

                                    if (extension_loaded('gd') && function_exists('gd_info')) {
                                        // move okay - create now thumbnail
                                        $x = JDownloadsHelper::create_new_thumb($upload_dir.$filename, $filename);       
                                        // set correct chmod
                                        @chmod($upload_dir.$filename, 0655);
                                        // move ok - set new file name as selected
                                        $images[] = $filename;
                                    } else {
                                        Factory::getApplication()->enqueueMessage( Text::_('COM_JDOWNLOADS_ERROR_CAN_NOT_CREATE_THUMB_IMAGE'), 'warning');
                                    }

Why should a thumbnail image file require 0655 (-rw-r-xr-x), i.e. execute permissions for both group and others? I think 0644 (-rw-r--r--) should be perfectly sufficient.

Regards
Tom
Title: Re: admin/src/Table/DownloadTable.php: 1137 - Permission 0655
Post by: ColinM on 07.06.2025 16:05:10
Tom
Thanks.  I am making a list of these.  The items you are finding are hangovers from very much earlier jD versions when such permissions seemed to be required.
Generally these days we concentrate on items that cause jD to fail or 'misbehave'. When we have one of these or sufficient enhancements are accumulated then a new release is made.  I suspect the Content Plugin may well turnout to be  such a case
Best wishes
Colin.