120

you can refer http://devdocs.magento.com/ The important things: The owner of the Magento file system: Must have full control (read/write/execute) of all files and directories. Must not be the web server user; it should be a different user. The web server user must have write access to the following files and directories: var app/etc ...


30

TL;DR truncate pub/static folder. For me, I had an older installation, which probably had some symlinks and old files which no longer exist. The issue checkInstallationFilePermissions is that it checks the permissions recursively. Files and folders. I had a missing symlink, and that returned false on the check if it's writable. How to debug: setup/src/...


20

In some rare cases, you can't use 770 and 660, like @MagenX says, 755 and 644 could also be the permission you need. (Some Fast-CGI users I guess) So in that case, you run: find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento That seems to fix it, but if Magento generates new files or ...


18

There are issue in Linux kernel security module (Security-Enhanced Linux (SELinux)) i.e SELinux permission issue. http://en.wikipedia.org/wiki/Security-Enhanced_Linux I have doing this by chcon -R -t httpd_sys_rw_content_t /var/www/html/magento/ chmod -R a+w /var/www/html/magento/


18

In general all files should be 644 and all folders should be 755 and should be owned by the user your web server runs under. The mage executable should be given 550 permissions to allow execution. This shell script should patch things up if run from your Mage root: #!/bin/sh find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; chmod ...


18

I haven't see many mentions of using 700 and 600 but it is generally good advice. Unfortunately every server set up is different and needs to be weighed up against convenience (user access to update/edit files). The underlying approach should be to only give away as little as possible and lock it down as much as you can (700/600 is good for this). In that ...


14

Please check and verify below steps: Check if your server is compatible with Magento. Download file from this link Magento Server Compatibility check and follow the instructions given. Check for the .htaccess in each folder and in root too. Magento has .htaccess in almost all folders. Verify it for media folder in case the problem is with image Execute the ...


12

You can use the method like the Magento documentation recommends: find . -type f -exec chmod 664 {} \; find . -type d -exec chmod 775 {} \; find var pub/static pub/media app/etc -type f -exec chmod g+w {} \; find var pub/static pub/media app/etc -type d -exec chmod g+ws {} \; chmod u+x bin/magento


12

Your var folder does not have the right permissions. I suggest you follow the official documentation to set the right permissions on your Magento instance: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html cd <your Magento install dir> find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \; find var ...


11

I ran into this error in development because of a broken symbolic link. I had created a file in a module's view/frontend/web directory that in developer mode was deployed to the pub/static directory using a symbolic link that pointed to the module's directory where the original file is stored. At some point in development I removed the file from my module,...


10

This is a permission problem, Magento is unable to write to your var directory. Please follow the official documentation to setup your permissions properly.


9

sudo find . -type d -exec chmod 770 {} \; && sudo find . -type f -exec chmod 660 {} \; && sudo chmod u+x bin/magento For local development set pub and var to 775 or 777


9

Basically, the latest Magento security patch SUPEE-7405 affects file permissions on images uploaded from the Magento admin dashboard. Before applying the patch, uploaded files via admin panel such as product images, cms pages etc. used 0777 permissions and the patch changes these permissions to 0640 and 0750 which make them inaccessible for all users. For ...


8

If you are using SELinux ̣(e.g. CentOS) try: sudo chcon -R -t httpd_sys_rw_content_t var (from magento root folder of course)


7

I want to explain a bit what @Sander Mangel said in his answer: make sure the Adminhtml controller of the module has a _isAllowed method Look for files like this: /app/code/community/your/module/controllers/Adminhtml/SomeController.php and make sure there's a method that looks like this inside every admin controller: protected function ...


7

If you look at how the admin menu is built in Mage_Adminhtml_Block_Page_Menu, you will notice, that the full menu path is only used as ACL resource, if the menu item does not have a resource specified: protected function _buildMenuArray(Varien_Simplexml_Element $parent=null, $path='', $level=0) { ... foreach ($parent->children() as $childName =&...


7

In Magento Community recommend We recommend setting the permissions as follows: All directories have 770 permissions. 770 permissions give full control (that is, read/write/execute) to the owner and to the group and no permissions to anyone else. All files have 660 permissions. 660 permissions mean the owner and the group can read and write but other ...


7

What is the “Client denied by server configuration app/etc/local.xml” error in Magento? The “Client denied by server configuration app/etc/local.xml” error in the web server error log represents Magento successfully blocking external access to the sensitive information within that file and reflects the normal, secure operation of your Magento installation. ...


7

Appending /setup to the install URL should resolve the issue. In your case that would be http://localhost/~myusername/magento/setup


6

I needed to create /media/wysiwyg and set write permissions. It was not created because magento could not write into /media.


6

Complete credits for @fschmengler for this link add this method in admin controllers: if you have an ACL resource defined in etc/adminhtml.xml , than protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('ENTER RESOURCE IDENTIFIER HERE'); }


6

You can give write permission by running below command in your CLI. takeown /F <folder name> For Example: takeown /F C:\wamp\www\Magento\www\pub\static


6

_isAllowed for controllers is called when the controller action is dispatched. to see if the current user has access to that specific action. If not, a 403 page is displayed. _isAllowedAction has no specific general meaning. It is declared in just 4 blocks and it is used just in that class. It is not used in parent classes or in abstract block classes. ...


5

While Phil's solution is good I use a little bit different approach. In addition to making the "php/webserver user" owner of files I create additional group. Usually it's called dev. And I add "php user" and myself and other developers to that group dev. Then I do chgrp so that all files in Magento project subtree have group dev. I add +s bit to folders ...


5

Is this installed on an Apache webserver? If not, the .htaccess functions will need to be translated to your flavor of web server software. Has DSO module for mod_rewrite been installed in Apache and been enabled to load? Is AllowOverrides enabled for the virtual server so Options +FollowSymLinks will function? You may have to check with your hosting service ...


5

I don't have a fully functional way of doing this, but I might have an idea. If you take a look at the Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes class, the one that renders the attribute tabs on the products add/edit page, you will see this in the _prepareForm method if (Mage::registry('product')->hasLockedAttributes()) { ...


5

There are a couple of thinks you can check make sure the Adminhtml controller of the module has a _isAllowed method check if the path in the _isAllowed method matches you ACL in the adminhtml.xml file make sure the cache is cleared after creating the role


5

no special permissions, you just make sure that files owned by user who runs php or in case of cPanel - cpanel user, and same group so your command is good: find . -type f -exec chmod -c 644 {} \; && find . -type d -exec chmod -c 755 {} \; just update files owner: chown -R user:user * where user is the owner, user who runs php. instead of ...


5

Similar issue also for sharing hosting: Magento 2: Recommended File Permission for shared hosting devdocs magento for permisions: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html and for prod: http://devdocs.magento.com/guides/v2.0/config-guide/prod/prod_file-sys-perms.html


5

Put this content inside your root folder, then execute it with the console. Dont forget to chmod +x yourfile.sh. #!/bin/sh chmod 2775 -R . chmod 777 -R ./pub/ chmod 777 -R ./var/


Only top voted, non community-wiki answers of a minimum length are eligible