Post by straightlight » Thu Apr 28, 2022 9:22 am

msklut wrote:
Thu Apr 28, 2022 9:21 am
straightlight wrote:
Thu Apr 28, 2022 9:17 am
msklut wrote:
Thu Apr 28, 2022 9:13 am
Do you see anything wrong with the config file? /storage/ path is set correctly. Some people online have suggested using this format, but it did not help.

Code: Select all

define('DIR_STORAGE', DIR_SYSTEM . '/storage/');
Unless your server path is otherwise than what it says it is on the topic, the storage folder location should be as it says.
The /storage/cache folder has already generated new folders. It's something else... When I moved the /storage folder, is there anything that is possibly looking at the old directory for log files?
Unless the server cache believes your storage folder is still temporarily on its old location, it shouldn't. At this point, another reason why you should let your host looking at this.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by msklut » Thu Apr 28, 2022 10:03 am

Unless the server cache believes your storage folder is still temporarily on its old location, it shouldn't. At this point, another reason why you should let your host looking at this.
Web host is useless. They're not able to provide any new information. Crazy how many threads there are with the exact issue, but none of the solutions provided work.

New member

Posts

Joined
Tue Nov 19, 2019 11:43 pm
Location - Charlotte, NC

Post by straightlight » Thu Apr 28, 2022 10:21 am

msklut wrote:
Thu Apr 28, 2022 10:03 am
Unless the server cache believes your storage folder is still temporarily on its old location, it shouldn't. At this point, another reason why you should let your host looking at this.
Web host is useless. They're not able to provide any new information. Crazy how many threads there are with the exact issue, but none of the solutions provided work.
That's simply because what these exact or similar issues are about are outside the scope of Opencart.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by msklut » Thu Apr 28, 2022 11:18 am

After lots of research, the issue was related to the File Protect feature in cPanel. See documentation below for more details. I hope this helps someone else!

https://support.cpanel.net/hc/en-us/art ... g-reverted
If File Protect is enabled:
All sites' document root directories will be set with GroupID nobody and 0750 permissions.

If File Protect is disabled:
All sites' document root directories will be set to 0755 permissions.

New member

Posts

Joined
Tue Nov 19, 2019 11:43 pm
Location - Charlotte, NC

Post by parkookk » Tue Sep 17, 2024 8:20 pm

Here is how to make a "recursive PHP script" to change permission for all the folders to 0755 and files to 0644 at once.

Create a new PHP file (e.g., set_permissions.php).
Add the following code in it.
Upload this script (e.g., set_permissions.php) to the directory where you want to apply the permissions.
Visit the script in your browser (e.g., http://yourdomain.com/yourfolder/set_permissions.php).
The script will recursively apply 0755 permissions to directories and 0644 to files from the current location.
After successful execution, you can delete the script.

Code: Select all

<?php
// Get the current directory (where the script is located)
$rootPath = __DIR__;

// Function to recursively set permissions
function setPermissions($dir) {
    // Open the directory
    $files = scandir($dir);

    foreach ($files as $file) {
        if ($file != '.' && $file != '..') {
            $filePath = $dir . '/' . $file;

            if (is_dir($filePath)) {
                // Set directory permissions to 0755
                chmod($filePath, 0755);

                // Recursively call the function for subdirectories
                setPermissions($filePath);
            } else {
                // Set file permissions to 0644
                chmod($filePath, 0644);
            }
        }
    }
}

// Call the function on the directory where this script is located
setPermissions($rootPath);

echo "Permissions have been set successfully.";
?>


I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london
Who is online

Users browsing this forum: No registered users and 12 guests