*

dsf

  • *****
  • 261 posts
Re: Why does Osclass make all the theme/plugin files as executables?
« Reply #30 on: February 16, 2023, 11:13:56 PM »
Yes, but do not see option to change it, so only option would be to set chmod on each after it is created

I understand now. I'm not a developer but this issue came probably with some Osclasspoint release. It was not so before.

So maybe the issue is somewhere else in the code. I dunno. You know all those things ....

*

MB Themes

Re: Why does Osclass make all the theme/plugin files as executables?
« Reply #31 on: February 17, 2023, 10:13:52 AM »
@dsf
PHP was upgraded, libraries were upgraded, processes not functional in old osclass were fixed, ...
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

morfik

  • ****
  • 169 posts
Re: Why does Osclass make all the theme/plugin files as executables?
« Reply #32 on: March 06, 2023, 03:44:50 PM »
One thing to note. When I set:

Code: [Select]
function osc_copy($source, $dest, $options = array('folderPermission' => 0755, 'filePermission' => 0644)) {
I can't install languages (and possibly other things) from the market. It creates dirs with  0644, which misses the exec permission to go inside the dir and the permission error is returned. But when I restored this to the original:

Code: [Select]
function osc_copy($source, $dest, $options = array('folderPermission' => 0755, 'filePermission' => 0755)) {
All files inside the language dirs have exec permission set.

So it looks like it can't determine whether the file is a regular file or whether it is a directory -- it treats both the same.

*

MB Themes

Re: Why does Osclass make all the theme/plugin files as executables?
« Reply #33 on: March 07, 2023, 01:51:25 PM »
@morfik
Find this line in oc-includes/osclass/utils.php:
Code: [Select]
$copyprocess = osc_copy(osc_content_path() . "downloads/oc-temp/" . $_file, $folder_dest . $_file);
Replace it with:
Code: [Select]
                  $copyoptions = $options = array('folderPermission' => 0755, 'filePermission' => 0644);
                 
                  if($type == 'languages') {
                    $copyoptions = $options = array('folderPermission' => 0755, 'filePermission' => 0755);
                  }
                 
                  $copyprocess = osc_copy(osc_content_path() . "downloads/oc-temp/" . $_file, $folder_dest . $_file, $copyoptions);

Anyway reverted these in prepared 8.1.2 as some folder needs 0755. Instead updated osc_copy funciton in ItemActions.php and set file permissions for images to 644
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

morfik

  • ****
  • 169 posts
Re: Why does Osclass make all the theme/plugin files as executables?
« Reply #34 on: March 07, 2023, 02:07:07 PM »
Anyway reverted these in prepared 8.1.2 as some folder needs 0755.

I would say all dirs need 0755 (or 0750). But none of the Osclass installation files (regular files, php/js/txt/img, etc) need to be exec, so they all should have 0644 or (0640)