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 ...
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/...
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.
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
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 {} \;
...
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 ...
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 ...
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 ...
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 ...
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-...
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/
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:...
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 ...
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 ...
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 ...
5
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 ...
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 -...
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 ...
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 ...
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-...
3
votes
Magento 2 Development permissions issue
Try fix permissons by commands below
sudo find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; && sudo find var vendor pub/static pub/media app/etc -type d -exec chmod g+...
3
votes
User with custom role cannot access custom menu item in Magento 2 admin interface
Your menu resource should match your acl resource.
So in your case you need to replace:
<resource id="Sup_Brand::shopbybrand" title="ShopByBrand" sortOrder="10" />
With:
<resource id="...
3
votes
Magento 2 - Fatal Error "Can't create directory" var/generation/Magento/
in my case,I only execute,and the error disappeared ,as I do not want to chmod too many foders 777.
cd var/generation
chmod -R 777 Magento
3
votes
Magento 2 - Fatal Error "Can't create directory" var/generation/Magento/
Please change the generation folder rewrite permission. Thats work for me.
sudo chmod -R 777 var/*
3
votes
Custom module role permission. How to add acl
Your "acl" tree does not match the "menu" tree.
You have to copy everything below menu to acl/resources/admin/children and remove the <action> nodes.
Example:
In your case, ...
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 ...
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 ...
3
votes
Accepted
Magento 2: New theme saving issue on Admin WAMP
Maybe you have missing web and etc folder in your theme folder.
please add below code in your theme,
you need to copy entire web folder from
/vendor/magento/theme-frontend-luma to app/design/...
3
votes
Magento 2 - Session based authentication doesn't work
The session based authentication (with "self" permission) is only allowed to AJAX calls and not to browser requests due to security vulnerabilities.
3
votes
Accepted
Not able to add permission on category in Magento 2
Category permission option only available in Magento 2 EnterPrise
Edition (MCOM)
So if you are using open source (Community edition) Then you need to
use Third party extension or you need to ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
permissions × 279magento2 × 107
magento-1.9 × 53
user-roles × 33
file-permissions × 33
admin × 21
cache × 20
acl × 19
installation × 17
error × 13
magento-2.1 × 8
magento-1.8 × 8
upgrade × 8
nginx × 8
magento2.3 × 7
adminhtml × 7
admin-user × 7
php × 6
access × 6
magento-1.7 × 5
module × 5
javascript × 5
css × 5
security × 5
cli × 5