1

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

abu abu
  • 744
  • 3
  • 15
  • 38

3 Answers3

3

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.

Manthan Dave
  • 9,816
  • 2
  • 31
  • 53
  • 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 09: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

Konrad Siamro
  • 1,457
  • 1
  • 17
  • 29
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.

uddwi
  • 11
  • 1