15

Use The following commands to set permissions, it may help find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; find ./var -type d -exec chmod 777 {} \; find ./media -type d -exec chmod 777 {} \; chmod 777 ./app/etc chmod 644 ./app/etc/*.xml


8

I had to re-run permission commands on my magento 2 installation directory. Don't know why would I need to re-run them. sudo chmod -R 777 /var/www/html/mg Is this correct? Seems excessive permission to me. Maybe within a close test environment?


6

I accidentally screwed up the folder permissions of the Magento root directory. There is no harm in resetting the correct permissions. For more information on permissions you can consult the official website: http://devdocs.magento.com/guides/m1x/install/installer-privileges_after.html You can use an FTP or SSH program to visually see what the file ...


5

Please, check the following links to set the permission properly: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/integrator_install.html http://devdocs.magento.com/guides/v2.0/install-gde/prereq/apache-user.html Just for summary: Magento team suggest to set the file permissions to 660, the directory ones to 770. It's can be done in the following ...


5

Try changing your permission for Index.php from 664 to 644 in root directory Do the same to Index.php in Downloader folder Delete cache


5

If you deleted samples files, you may have an error such as : update-cron.ERROR: Cron readiness check failure! Found non-writable paths: /magento2/.htaccess.sample /magento2/.php_cs /magento2/.travis.yml /magento2/.user.ini /magento2/CHANGELOG.md /magento2/CONTRIBUTING.md /magento2/COPYING.txt /magento2/Gruntfile.js.sample /...


5

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:apache. Because apache2 does not have access to the group $USER, the website cannot be properly served. In order to retain proper permissions, magento commands ...


5

You need to Set permission in Var like ... Sudo chmod 0777 -R var/ generated/ If sudo not working then just .. chmod 0777 -R var/ generated/


3

I guess it's just a permission problem. Just make this .htaccess.sample writeable for the user that runs the script You can find the permissions documentation on the official website: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html


3

The M2 setup requires a specific user, not www-data, to be magento system owner. Running any bin/magento command as root will create files and folders as root, which may cause issues. See: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html We have a deployment in which we use the following command for example su magento_user -...


3

777 should never be used. For a Magento installation, after it has been installed, the entire document root should be unwritable by the web server user (with some exceptions). They should be owned by a user other than the web server user. The only directories that should be writable should be the /media and /var directories and their write permissions ...


3

As this is a permissions issue you should run all commands from the CLI as the web server user. Typically it is www-data user, so after you set all permissions (as magento devdocs recommends) DO NOT execute: sudo php bin/magento setup:static-content:deploy Because the magento will generate all files with the root user and it will be the owner of the files. ...


3

This is a server error. if you have a developer store, please go to index.php under your root magento store and enable developer mode. Just paste this code after line 72 Mage::setIsDeveloperMode(true); and uncomment ini_set('display_errors', 1); if it is commented. Then you are able to view the error and can research for it on google or can comment here.


3

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 directories: chcon -R --type httpd_sys_rw_content_t <your Magento install dir>/app/etc chcon -R --type httpd_sys_rw_content_t <your Magento install ...


3

main.CRITICAL: Can't create directory This is a permission problem, Magento is unable to write to your generated directory. Please check this documentation to setup your permissions properly. If you have SSH details then run following command from your magento root directory sudo chmod -R 777 pub/media pub/static var generated Magento\Authorization\Model\...


3

Run this command: chmod -R 777 var/*


2

You should only use 755 for directories and 644 for files (they don't need the executable permission). Use these commands in the skin directory to apply the permissions recursively: find . -type f -exec chmod 644 {} ; find . -type d -exec chmod 755 {} ; The first line finds all files and chmods them to 644, the second line finds all directories and chmods ...


2

I use Nexcess, magento use 700 permissions (drwx------) for the media/ and var/ directories give full control (that is, read/write/execute) to the owner and no permissions to anyone else. Magento expects the webserver to own the site files: http://devdocs.magento.com/guides/m1x/install/installer-privileges_after.html#privs-after You can resolve this ...


2

I reckon it's related to the following changes from 1.9.2.3: Files uploaded via admin panel (i.e. product image upload) are now not world readable by default (before: 777 / after: 640). Directories are also not world executable (before 755 / after: 750). This two can cause issues with images not appearing on the website if the webserver runs as a different ...


2

your parent theme name is <parent>Magento/blank</parent> so change this "name": "magento/theme-frontend-luma", to "name": "magento/theme-frontend-blank", check this link


2

Make sure that your var and var/cache directories are writable. The issue generally arises when var directory is not writable. For one guy he commented this as solution: Finally I found a little strange solution. I just add a new directory magento/null (777) in magento and it's resolved my problem. Go to this LINK, there was a discussion for the same ...


2

With regards to Mohammad's answer, permissions should never be set to 777. 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:apache. Because apache2 does not have access to the group $USER, the website cannot be properly served. In order to ...


2

I had a simple fix for my Readiness check fail. Normally this happens due to issue with owner of the the file /folder where it says "non-writable" Issue was, Readiness check fails and says. Cron check fails non writable path found /bitnami/apps/magento/htdocs/var/.htaccess my fix on Magneto 2.3 was .htaccess no found in the folder. So create vi /opt/...


2

@Lauren I would suggest taking a look at this if you haven't already: http://devdocs.magento.com/guides/v2.0/install-gde/install/post-install-umask.html . If you do decide to use this: rm -rf public_html/pub/static/* public_html/pub/media/* public_html/var/generation/* public_html/var/di Correctly set permissions on public_html (chmod 755 -R public_html or ...


2

This was happening with me, too. I ended up specifically outlining those directories in the CLI (the directories giving me issues were inside var/cache and var/generation) via chmod. But what did it for me was LOGGING OUT, flushing cache upon login, and THEN re-running the test. find var vendor pub/static pub/media app/etc var/cache var/generation -type ...


2

use: Linux Malware Detect Linux Malware Detect (LMD) is a malware scanner for Linux released under the GNU GPLv2 license, that is designed around the threats faced in shared hosted environments. It uses threat data from network edge intrusion detection systems to extract malware that is actively being used in attacks and generates signatures for ...


2

Which ones need the 777 and which ones don't? No directories should have 777 permissions. If 755 does not work for you, change group permissions instead. Look at the files created by Magento to see with which user PHP runs: ls -la media/catalog/product/cache you'll see something like this in the first line: drwxrwx--- 7 web-user web-user 4096 Sep 21 12:...


2

First Set proper permission to your setup as per magento2 permission guidelines. You need to add your current group to apache user. For Ubuntu: sudo usermod -a -G www-data $USER For CentOs: sudo usermod -a -G apache $USER If you have any issue after this, then you can simply grant ownership of any inaccessible files or folders by below command. For ...


2

Based on your command you are place your project in wrong location. Change: sudo chown myuser:www-data /var/www/magento -R Into: sudo chown myuser:www-data /var/www/html/magento -R Or Else you do like this also: sudo chown www-data:www-data -R /var/www/html/magento I hope this will help you some extend. Thanks! Note: for better practice follow this ...


2

According to this: http://devdocs.magento.com/guides/v2.2/config-guide/prod/prod_file-sys-perms.html To update components, install new components, or to upgrade the Magento software, all of the preceding directories must be read-write. So during upgrade and compile and static deploy they of course need write permission but after those are done you can ...


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