SSH mode (for standalone servers or VPS)
The code is as follows |
Copy Code |
Find. -type f-exec chmod 644 {}; Find. -type d-exec chmod 755 {}; chmod o+w var var/.htaccess app/etc Chmod Mage Chmod-r O+w Media If is isn't working, try setting all directories to 777 by doing this: Find. -type f-exec chmod 644 {}; Find. -type d-exec chmod 777 {}; chmod o+w var/.htaccess Chmod Mage |
Operations in Magento
For example, level Two menu is not available, Magento Connect is not available, pictures do not show, and so on, most of the reasons are file permissions are not set or improper settings caused. The following are the basic file and folder settings.
755 Permissions
The code is as follows |
Copy Code |
Magento/app/etc Magento/media Magento/app Magento/skin Magento/var Magento/var/.htaccess Magento/js Magento/downloader 644 Permissions magento/index.php magento/downloader/index.php |
PHP Modify Permissions
The code is as follows |
Copy Code |
<?php # # Setup file 644, directory 755 function Alldirchmod ($dir = "./", $dirModes = 0755, $fileModes = 0644) { $d = new Recursivedirectoryiterator ($dir); foreach (New Recursiveiteratoriterator ($d, 1) as $path) { if ($path->isdir ()) chmod ($path, $dirModes); else if (Is_file ($path)) chmod ($path, $fileModes); } } ?> |
?>