I think i messed up the whole permissions for my website and now when i try to acces it i get this message:

Forbidden You don't have permission to access / on this server.

Some folder have the permision 0000 and in ftp they appear with flcmdpe instead of rwxr-xr-x Does any of you know how can i set my permissions back to normal so i can see the website again, please? Thanks!

  • When you write sudo chmod 0777 -R in your directory, do you get this error? May 31, 2018 at 18:04
  • I get this error when i acces the website address! Jun 1, 2018 at 6:34
  • If you are on linux machine then you can set full permission. Jun 1, 2018 at 6:50
  • @Manish Goswami i used chmod 777 httpdocs (the directory i have installed magento) but now i get this errors when i acces the website: textsaver.flap.tv/lists/1zxb Jun 1, 2018 at 7:13

3 Answers 3


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 pub (and probably new in 2.2.1:) generated

In addition, the web server's group must own the Magento file system so that the Magento user (who is in the group) can share access to files with the web server user. (This includes files created by the Magento Admin or other web-based utilities.)

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    users have no permissions.

You should set as bellow recommended

    cd <your Magento install dir> 

    find . -type f -exec chmod 644 {} \;                        // 644 permission for files

    find . -type d -exec chmod 755 {} \;                        // 755 permission for directory 

    find ./var -type d -exec chmod 777 {} \;                // 777 permission for var folder    

    find ./pub/media -type d -exec chmod 777 {} \;

    find ./pub/static -type d -exec chmod 777 {} \;

    chmod 777 ./app/etc

    chmod 644 ./app/etc/*.xml

    chown -R :<web server group> .

    chmod u+x bin/magento

I hope this will help you.


Follow these permission guide from magento



its a good practice to have folders with 755 and files with 644 permission. and sensitive files should be 700.

You need to use chmod 755 instead of 750 on directories. Using 750 equates to users having read, write, and execute, groups having read and execute, and finally, world (i.e your visitors) having absolutely zero access, thus they will be forbidden from accessing and/or viewing the contents.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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