Skip to main content

Timeline for Magento 2 folder/file permissions

Current License: CC BY-SA 4.0

31 events
when toggle format what by license comment
S Jan 14, 2021 at 13:54 history suggested Edie Lemoine CC BY-SA 4.0
NEVER use chmod 777. It's dangerous and just leaving it out will work in this case. (https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html#perms-shared)
Jan 14, 2021 at 13:29 review Suggested edits
S Jan 14, 2021 at 13:54
Nov 13, 2020 at 15:58 history edited Rafael Corrêa Gomes CC BY-SA 4.0
Improving the answer
S Apr 15, 2020 at 8:36 history rollback Denish Vachhani
Rollback to Revision 5 - Edit approval overridden by post owner or moderator
Apr 2, 2020 at 8:34 history suggested Tom Anderson CC BY-SA 4.0
Shell scripts don't use double slash for comments but hash.
Apr 2, 2020 at 6:36 review Suggested edits
S Apr 15, 2020 at 8:36
Jul 28, 2019 at 17:42 comment added Aadii Mughal chmod: changing permissions of './var/log/system.log': Operation not permitted
Apr 29, 2019 at 13:48 comment added SudoPlz You said files should have 660 yet we set 644 to files? Why?
Apr 11, 2019 at 15:02 comment added snh_nl I am uncertain if the answer is complete. I see some comments about chmod 777. So is the above answer correct? or should it be adapted?
Dec 14, 2018 at 12:43 comment added zus What about windows 7, how can i give above all commands to windows?
Jul 16, 2018 at 8:42 comment added CompactCode @MilanSimek Well it depends much on how your internal permissions are set. Your app/etc directory should NEVER have 777 permissions. Only your user that actually does the connection should have permissions to that fille. Otherwise this can be a breach easily
Jul 16, 2018 at 0:29 comment added Milan Simek @SwAt.Be There's a .htaccess file in the app folder with Deny from all, so why would this be a security concern? The web server user must be able to read this file anyway. Edit: On shared hosting I agree though
May 11, 2018 at 23:07 comment added CompactCode app/etc 777> Haha nice. Hackable easy. app/etc contains your db information
S Dec 4, 2017 at 20:29 history suggested Felix CC BY-SA 3.0
include the folder generated/ into the list
Dec 4, 2017 at 16:47 review Suggested edits
S Dec 4, 2017 at 20:29
Oct 24, 2017 at 20:22 comment added jamil I always use the find variante with +, as in find ./pub/static -type d -exec chmod 777 {} +; and it runs MUCH faster. I never see this referenced though is that wrong?
Jun 22, 2017 at 6:55 history edited Denish Vachhani CC BY-SA 3.0
deleted 1 character in body
Jun 6, 2017 at 18:46 comment added Mykhailo Shatilov I have apache, ec2-user and jenkins user. How I can set permissions for /var/www/site? Your variant isn't working for 3 users. Thanks.
Apr 13, 2017 at 8:36 review Suggested edits
Apr 13, 2017 at 9:01
S Mar 24, 2017 at 9:52 history suggested WaPoNe CC BY-SA 3.0
Some improvements
Mar 24, 2017 at 9:43 review Suggested edits
S Mar 24, 2017 at 9:52
Jan 31, 2017 at 0:12 comment added Darren Felton friends don't let friends 777
Aug 17, 2016 at 11:08 comment added Volvox I think you also need chmod u+x bin/magento to be able to execute console commands.
Aug 8, 2016 at 17:22 history edited brentwpeterson CC BY-SA 3.0
added 5 characters in body
Feb 22, 2016 at 18:52 comment added Alex But this is for development mode. For production it should be group-readonly - no idea how that should work
Feb 15, 2016 at 17:26 review Suggested edits
Feb 16, 2016 at 4:19
Jan 19, 2016 at 11:48 comment added MagenX the issue here will be chown not chmod proper user with suPHP is the most important :)
Jan 11, 2016 at 14:42 comment added bpoiss It only works for me with \;, e.g.: find ./var -type d -exec chmod 777 {} \;
Dec 25, 2015 at 13:10 review Suggested edits
Dec 25, 2015 at 13:50
Dec 25, 2015 at 12:24 vote accept Neekoy
Dec 25, 2015 at 7:49 history answered Denish Vachhani CC BY-SA 3.0