0

I am using Linux Mint. I installed a quick package of Magento 2 Theme. I tried to browse Admin Panel. But I couldn't browse. Then I found I have to change file & folder permission. I tried below command to change file permission.

foysal@foysal-laptop /var/www/html/aloquick $ find . -type f -exec chmod 644 {} \;

I got below result.

chmod: changing permissions of './var/generation/Magento/Weee/Model/Tax/Proxy.php': Operation not permitted

I tried below command to change folder permission.

foysal@foysal-laptop /var/www/html/aloquick $ find . -type d -exec chmod 775 {} \;

I got below result.

chmod: changing permissions of './var/generation': Operation not permitted

Where is the issue ? Am I using wrong commands ?

UPDATE

I executed (sudo find . -type f -exec chmod 644 {} \; sudo find . -type d -exec chmod 775 {} \;) this commands. But I can't browse both front end and back end of the site.

enter image description here

enter image description here

2
  • sudo find . -type f -exec chmod 644 {} \; sudo find . -type d -exec chmod 775 {} \;
    – user15917
    Apr 4 '17 at 5:07
  • Thanks @jack. I ran your command but the issue remains as like before.
    – abu abu
    Apr 11 '17 at 9:27
2

Give 775 permission to your var and pub/media directory.

Run below command for the same.

  • sudo chmod -R 775 /var/generation
  • sudo chmod -R 775 /pub/media

If in case in your server 775 not work then try same command with 777 for those 2 folders and check.

1
  • Thanks @Manthan Dave. I ran your command and get below results. foysal@foysal-laptop /var/www/html/magento2 $ sudo chmod -R 775 /var/generation chmod: cannot access '/var/generation': No such file or directory foysal@foysal-laptop /var/www/html/magento2 $ sudo chmod -R 775 /pub/media chmod: cannot access '/pub/media': No such file or directory foysal@foysal-laptop /var/www/html/magento2 $
    – abu abu
    Apr 11 '17 at 9:28
1

changing permissions with sudo should be fine.

Anyway some info about permissions for Magento doc ;)

http://devdocs.magento.com/guides/v2.1/install-gde/prereq/file-system-perms.html http://devdocs.magento.com/guides/v2.1/config-guide/prod/prod_file-sys-perms.html
also
Magento 2 folder/file permissions

1

Give 775 permission to your var and pub/media directory.

Run below command for the same.

cd /path/to/your/project

sudo chmod -R 775 var/generation
sudo chmod -R 775 pub/media

check the user and group and correct it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.