Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
23 votes

Magento 2 folder/file permissions

You can use the method like the Magento documentation recommends: sudo find . -type f -exec chmod 664 {} \; sudo find . -type d -exec chmod 775 {} \; sudo find var pub/static pub/media app/etc -type f ...
Rafael Corrêa Gomes's user avatar
12 votes

Magento installation: Getting Fatal error

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/...
Raphael at Digital Pianism's user avatar
10 votes
Accepted

image uploads using wrong permissions

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 ...
Jameslj's user avatar
  • 434
10 votes
Accepted

Magento 2 - Fatal Error "Can't create directory" var/generation/Magento/

This is a permission problem, Magento is unable to write to your var directory. Please follow the official documentation to setup your permissions properly.
Raphael at Digital Pianism's user avatar
9 votes

Magento 2 folder/file permissions

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)
HausO's user avatar
  • 101
8 votes

Client denied by server configuration /app/etc/config.php

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 ...
Dayssam's user avatar
  • 131
7 votes
Accepted

How to set write permission to folder in magento 2 in windows?

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
MaYaNk's user avatar
  • 1,730
7 votes

Magento setup directory cannot be accessed

Appending /setup to the install URL should resolve the issue. In your case that would be http://localhost/~myusername/magento/setup
Andrew B's user avatar
7 votes

Magento 2: Permission issue with generated directory

Magento 2 recommended folder and file permission Please follow following terminal commands for folder and file permission. find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; ...
Arunprabakaran M's user avatar
7 votes

Magento 2: Permission issue with generated directory

It' sometimes happen, that after run any command bin/magento your generated folder has changed ovnership to youruser:youruser, but should be youruser:www-data (for apache2 for example). To fix that ...
BartZalas's user avatar
  • 1,757
6 votes
Accepted

Getting Access Denied for module

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 ...
Baby in Magento's user avatar
6 votes

Missing write permissions in directory pub/static when run bin/magento setup:upgrade

Inside your Magento root directory run the commands below and your issue should be gone: $ rm -rf pub/static/* $ php bin/magento setup:static-content:deploy Worked for me.
medina's user avatar
  • 565
6 votes
Accepted

Magento 2: What is diffrence between _isAllowed & _isAllowedAction?

_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 ...
Marius's user avatar
  • 198k
6 votes
Accepted

Magento2 admin logo showing 403 Forbidden error

Enter the following commands in the order shown: cd <your Magento install dir> find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \; find var vendor pub/static pub/media ...
Suresh Chikani's user avatar
5 votes

Magento 2 folder/file permissions

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/
Sheshgiri Anvekar's user avatar
5 votes

Magento 2 folder/file permissions

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-...
Konrad Siamro's user avatar
5 votes

Magento 2 - Fatal Error "Can't create directory" var/generation/Magento/

This should help - it sets your permissions based on magento documentation. sudo find . -type d -exec chmod 770 {} \; && sudo find . -type f -exec chmod 660 {} \; && sudo chmod u+x ...
Collin Blake's user avatar
5 votes
Accepted

Permission change after setup:upgrade

See my answer to this question. The problem here is that newly generated files are owned by the user and group who issues the command $USER:$USER, where they should belong to $USER:www-data or $USER:...
Muckee's user avatar
  • 699
5 votes

Trying to install magento 2 and get page_cache is not writable

Had the same issue with var/page_cache not writable. OP's answer pointed me in the right direction. Rather than disabling SELinux completely, need to update SELinux security context for following ...
User007's user avatar
  • 97
5 votes
Accepted

Magento2 throws 500 internal server error

For 500 error, you need to enable mod_version in apache. You can check all the enabled apache modules with the command apache2ctl -M. If you don't see it in the list, then it's not installed. To do ...
Lez's user avatar
  • 2,917
5 votes
Accepted

I am getting error of page_cache is not writable in magento 2.2.5 in linux os

I have faced same type of error few days ago. You can fix it by following ways.. chmod 777 -R var/ generated/(root access if don't have root access try with sudo) NP: *****you need to give ...
MR.R DNATH's user avatar
4 votes

Magento 2 folder/file permissions

find . -type f -exec chmod 400 {} \; find . -type d -exec chmod 500 {} \; find var/ -type f -exec chmod 600 {} \; find media/ -type f -exec chmod 600 {} \; find var/ -type d -exec chmod 700 {} \; find ...
Rushvi's user avatar
  • 2,843
4 votes

Magento 2 folder/file permissions

Execute these commands as a root user. If you have already given 777 permission revert it using first two commands else proceed with the rest. find . -type f -exec chmod 664 {} \; find . -type d -...
Raj Mohan R's user avatar
  • 2,048
4 votes

How to set write permission to folder in magento 2 in windows?

you can Use takeown command to give write permission to the file takeown /r /d y /f * ^ Recursively give permission to all files without prompting "are you sure". Use following with icacls set ...
Lucky's user avatar
  • 41
4 votes

Magento2 throws 500 internal server error

As per the suggestion given by @Pramodkharade on comments, I need to enable mod_version module from my httpd.conf Change below # LoadModule version_module modules/mod_version.so To LoadModule ...
Anto S's user avatar
  • 1,417
4 votes

Changes in phtml not visible in the browser

php bin/magento cache:flush is used when you change .php files. When you change .phtml or .XML files you have to deploy static content. try this, php bin/magento setup:static-content:deploy and ...
Bhakti Thakkar's user avatar
4 votes
Accepted

Class Magento\InventoryCatalogAdminUi\Observer\SourceItemsProcessor does not exist

I have solved this issue by removing non exist class which was used by 3rd party module the class has moved in https://github.com/magento/inventory/commit/9f17e1a256059bd970ab8d1feefabb68915316f9#diff-...
Banna Online's user avatar
  • 1,069
4 votes

Magento 2 - The requested class did not generate properly, because the 'generated' directory permission is read-only

After a lot of tinkering, I've finally found a solution. Delete these folders: generated and var Run these commands php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento ...
Mattia S.'s user avatar
  • 141
3 votes

Access Denied for Custom Module for specific role

Problem resolved. By modifying _isAllowed() function like following protected function _isAllowed() { return true; } It's a very bad decision. In you case right way is: protected function ...
Александр Резниченко's user avatar
3 votes

Magento installation: Getting Fatal error

You can easily solve this by going to the document root via terminal and providing permission to var folder like this: chmod -R 777 var Then please trying refreshing and the installation mode will ...
Shyam Krishna Sreekumar's user avatar

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