{"id":11072,"date":"2026-01-14T07:25:12","date_gmt":"2026-01-14T07:25:12","guid":{"rendered":"https:\/\/www.magetop.com\/blog\/?p=11072"},"modified":"2026-01-14T07:26:05","modified_gmt":"2026-01-14T07:26:05","slug":"set-magento-2-file-permissions-correctly","status":"publish","type":"post","link":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/","title":{"rendered":"Set Magento 2 File Permissions Correctly"},"content":{"rendered":"\n<p>Magento 2 file permissions are one of the most common reasons why stores break after running setup:upgrade, setup:di:compile, or deploying static content. If permissions are wrong, Magento cannot write files, cache fails, and the site may show 500 errors. In this guide, you\u2019ll learn how to set Magento 2 file permissions correctly for both single-user and multi-user servers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Understanding Magento 2 File Permissions<\/strong><\/h3>\n\n\n\n<p>Before fixing Magento file permissions, you need to understand three basic concepts in Linux:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Owner<\/strong> \u2013 the user who owns the file<\/li>\n\n\n\n<li><strong>Group<\/strong> \u2013 a group of users who share access<\/li>\n\n\n\n<li><strong>Permission<\/strong> \u2013 read (r), write (w), execute (x)<\/li>\n<\/ul>\n\n\n\n<p>Common permission values:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>755 = owner can write, others can read<\/li>\n\n\n\n<li>775 = owner and group can write<\/li>\n\n\n\n<li>644 = file readable by all, writable by owner<\/li>\n<\/ul>\n\n\n\n<p>Magento needs write access to some folders, but most of the system should stay read-only for security.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Magento File Permissions for Single-User Servers<\/strong><\/h3>\n\n\n\n<p>A single-user setup means:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SSH user = web server user (nginx\/apache)<\/li>\n<\/ul>\n\n\n\n<p>This is the simplest and safest model.<\/p>\n\n\n\n<p><strong>Recommended setup:<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ncd \/var\/www\/magento\nfind . -type d -exec chmod 755 {} \\;\nfind . -type f -exec chmod 644 {} \\;\nchmod +x bin\/magento\n\nchmod -R 775 var generated pub\/static pub\/media\n<\/pre><\/div>\n\n\n<p><strong>Why this works:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Core files stay protected<\/li>\n\n\n\n<li>Magento can write to:\n<ul class=\"wp-block-list\">\n<li>var<\/li>\n\n\n\n<li>generated<\/li>\n\n\n\n<li>pub\/static<\/li>\n\n\n\n<li>pub\/media<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>This setup prevents most Magento 2 file permissions issues.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Magento File Permissions for Multi-User Servers<\/strong><\/h3>\n\n\n\n<p>Multi-user setup means:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>One user runs SSH commands<\/li>\n\n\n\n<li>Another user runs web server<\/li>\n<\/ul>\n\n\n\n<p>This often causes permission denied errors.<\/p>\n\n\n\n<p><strong>Step 1: Create a shared group<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo groupadd magento\nsudo usermod -a -G magento www-data\nsudo usermod -a -G magento youruser\n<\/pre><\/div>\n\n\n<p><strong>Step 2: Change ownership<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo chown -R youruser:magento \/var\/www\/magento\n<\/pre><\/div>\n\n\n<p><strong>Step 3: Set group permissions<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nfind . -type d -exec chmod 775 {} \\;\nfind . -type f -exec chmod 664 {} \\;\nchmod g+s .\nchmod +x bin\/magento\n\nchmod -R 775 var generated pub\/static pub\/media\n<\/pre><\/div>\n\n\n<p>Now both users can write safely without breaking Magento 2 file permissions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Recommended Magento File Permissions by Folder<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Folder\/File<\/strong><\/td><td><strong>Permission<\/strong><\/td><td><strong>Reason<\/strong><\/td><\/tr><tr><td>app\/<\/td><td>755<\/td><td>Read-only code<\/td><\/tr><tr><td>vendor\/<\/td><td>755<\/td><td>Composer files<\/td><\/tr><tr><td>var\/<\/td><td>755<\/td><td>Cache, logs<\/td><\/tr><tr><td>generated\/<\/td><td>755<\/td><td>DI compile<\/td><\/tr><tr><td>pub\/static\/<\/td><td>755<\/td><td>Static deploy<\/td><\/tr><tr><td>pub\/media\/<\/td><td>755<\/td><td>Uploads<\/td><\/tr><tr><td>bin\/magento<\/td><td>755<\/td><td>Executable<\/td><\/tr><tr><td>.htaccess<\/td><td>644<\/td><td>Read-only<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Why Magento Breaks After setup:upgrade or setup:di:compile<\/strong><\/h3>\n\n\n\n<p>Magento 2 file permissions often break because:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Commands are run as a different user<\/li>\n\n\n\n<li>New files get wrong owner<\/li>\n\n\n\n<li>Web server cannot read\/write them<\/li>\n\n\n\n<li>Result: 500 error, blank page, or admin down<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You run <code>setup:di:compile<\/code> as root<\/li>\n\n\n\n<li>Files become owned by root<\/li>\n\n\n\n<li>Web server cannot access them<\/li>\n\n\n\n<li>Site crashes<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How to Fix Permission Errors Step by Step<\/strong><\/h3>\n\n\n\n<p><strong>1. Go to Magento root<\/strong><\/p>\n\n\n\n<p><strong>2. Reset ownership<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo chown -R youruser:magento \/var\/www\/magento\n<\/pre><\/div>\n\n\n<p><strong>3. Reset permissions<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nfind . -type d -exec chmod 775 {} \\;\nfind . -type f -exec chmod 664 {} \\;\nchmod -R 775 var generated pub\/static pub\/media\nchmod +x bin\/magento\n<\/pre><\/div>\n\n\n<p><strong>4. Clear generated folders<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nrm -rf var\/cache var\/page_cache generated\/*\n<\/pre><\/div>\n\n\n<p><strong>5. Run Magento commands again<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Security Tips for permission config<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Never use 777 in production<\/li>\n\n\n\n<li>Never run Magento as root<\/li>\n\n\n\n<li>Keep app\/ and vendor\/ read-only<\/li>\n\n\n\n<li>Only allow write access where needed<\/li>\n\n\n\n<li>Always fix permissions after deploy<\/li>\n<\/ul>\n\n\n\n<p>Correct Magento file permissions protect your store from both errors and attacks.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>Magento file permissions are critical for a stable and secure store. Most broken setups come from wrong ownership or permissions, especially after running setup:upgrade or setup:di:compile.<\/p>\n\n\n\n<p>If your store feels unstable, don\u2019t panic\u2014our full Magento services team is ready to help you fix permission issues, improve performance, and grow your business. Explore all <a href=\"https:\/\/www.magetop.com\/magento-services.html\">our services<\/a>.<\/p>\n\n\n\n<p>Set Magento 2 file permissions correctly from day one, and you\u2019ll avoid many painful production issues later.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento 2 file permissions are one of the most common reasons why stores break after running setup:upgrade, setup:di:compile, or deploying<\/p>\n","protected":false},"author":106,"featured_media":11076,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[2545,2520,2542,2543,125,2499,2544],"class_list":["post-11072","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento-2-tutorials","tag-deployment","tag-devops","tag-file-permissions","tag-linux","tag-magento-2","tag-security","tag-server-setup"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Set Magento 2 File Permissions Correctly - Magetop Blog<\/title>\n<meta name=\"description\" content=\"Learn how to set Magento 2 file permissions correctly for single and multi-user servers to avoid permission denied errors, broken setup:upgrade, and failed di:compile.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Set Magento 2 File Permissions Correctly - Magetop Blog\" \/>\n<meta property=\"og:description\" content=\"Learn how to set Magento 2 file permissions correctly for single and multi-user servers to avoid permission denied errors, broken setup:upgrade, and failed di:compile.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/\" \/>\n<meta property=\"og:site_name\" content=\"Magetop Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MagetopStore\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-14T07:25:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-14T07:26:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/01\/Set-Magento-2-File-Permissions-Correctly.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1355\" \/>\n\t<meta property=\"og:image:height\" content=\"753\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Aaron LX\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MagetopStore\" \/>\n<meta name=\"twitter:site\" content=\"@MagetopStore\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aaron LX\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/\"},\"author\":{\"name\":\"Aaron LX\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7\"},\"headline\":\"Set Magento 2 File Permissions Correctly\",\"datePublished\":\"2026-01-14T07:25:12+00:00\",\"dateModified\":\"2026-01-14T07:26:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/\"},\"wordCount\":476,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/01\/Set-Magento-2-File-Permissions-Correctly.png?fit=1355%2C753&ssl=1\",\"keywords\":[\"Deployment\",\"DevOps\",\"File Permissions\",\"Linux\",\"magento 2\",\"Security\",\"Server Setup\"],\"articleSection\":[\"Magento 2 Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/\",\"url\":\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/\",\"name\":\"Set Magento 2 File Permissions Correctly - Magetop Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/01\/Set-Magento-2-File-Permissions-Correctly.png?fit=1355%2C753&ssl=1\",\"datePublished\":\"2026-01-14T07:25:12+00:00\",\"dateModified\":\"2026-01-14T07:26:05+00:00\",\"description\":\"Learn how to set Magento 2 file permissions correctly for single and multi-user servers to avoid permission denied errors, broken setup:upgrade, and failed di:compile.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/01\/Set-Magento-2-File-Permissions-Correctly.png?fit=1355%2C753&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/01\/Set-Magento-2-File-Permissions-Correctly.png?fit=1355%2C753&ssl=1\",\"width\":1355,\"height\":753,\"caption\":\"Set Magento 2 File Permissions Correctly\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.magetop.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Set Magento 2 File Permissions Correctly\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#website\",\"url\":\"https:\/\/www.magetop.com\/blog\/\",\"name\":\"Magetop Blog\",\"description\":\"Exploring Magento Tips, Tricks, and Trends\",\"publisher\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.magetop.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\",\"name\":\"Magetop.com\",\"url\":\"https:\/\/www.magetop.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1\",\"width\":475,\"height\":475,\"caption\":\"Magetop.com\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/MagetopStore\",\"https:\/\/x.com\/MagetopStore\",\"https:\/\/www.linkedin.com\/company\/magetop\",\"https:\/\/www.pinterest.com\/magetop\",\"https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7\",\"name\":\"Aaron LX\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1\",\"caption\":\"Aaron LX\"},\"description\":\"Aaron is a passionate writer, crazy about shopping, eCommerce and trends. Besides his outstanding research skills and a positive mind, Aaron eagerly shares his experience with the readers.\",\"url\":\"https:\/\/www.magetop.com\/blog\/author\/aaron-lx\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Set Magento 2 File Permissions Correctly - Magetop Blog","description":"Learn how to set Magento 2 file permissions correctly for single and multi-user servers to avoid permission denied errors, broken setup:upgrade, and failed di:compile.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/","og_locale":"en_US","og_type":"article","og_title":"Set Magento 2 File Permissions Correctly - Magetop Blog","og_description":"Learn how to set Magento 2 file permissions correctly for single and multi-user servers to avoid permission denied errors, broken setup:upgrade, and failed di:compile.","og_url":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/","og_site_name":"Magetop Blog","article_publisher":"https:\/\/www.facebook.com\/MagetopStore","article_published_time":"2026-01-14T07:25:12+00:00","article_modified_time":"2026-01-14T07:26:05+00:00","og_image":[{"width":1355,"height":753,"url":"https:\/\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/01\/Set-Magento-2-File-Permissions-Correctly.png","type":"image\/png"}],"author":"Aaron LX","twitter_card":"summary_large_image","twitter_creator":"@MagetopStore","twitter_site":"@MagetopStore","twitter_misc":{"Written by":"Aaron LX","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#article","isPartOf":{"@id":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/"},"author":{"name":"Aaron LX","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7"},"headline":"Set Magento 2 File Permissions Correctly","datePublished":"2026-01-14T07:25:12+00:00","dateModified":"2026-01-14T07:26:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/"},"wordCount":476,"commentCount":0,"publisher":{"@id":"https:\/\/www.magetop.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/01\/Set-Magento-2-File-Permissions-Correctly.png?fit=1355%2C753&ssl=1","keywords":["Deployment","DevOps","File Permissions","Linux","magento 2","Security","Server Setup"],"articleSection":["Magento 2 Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/","url":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/","name":"Set Magento 2 File Permissions Correctly - Magetop Blog","isPartOf":{"@id":"https:\/\/www.magetop.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#primaryimage"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/01\/Set-Magento-2-File-Permissions-Correctly.png?fit=1355%2C753&ssl=1","datePublished":"2026-01-14T07:25:12+00:00","dateModified":"2026-01-14T07:26:05+00:00","description":"Learn how to set Magento 2 file permissions correctly for single and multi-user servers to avoid permission denied errors, broken setup:upgrade, and failed di:compile.","breadcrumb":{"@id":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#primaryimage","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/01\/Set-Magento-2-File-Permissions-Correctly.png?fit=1355%2C753&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/01\/Set-Magento-2-File-Permissions-Correctly.png?fit=1355%2C753&ssl=1","width":1355,"height":753,"caption":"Set Magento 2 File Permissions Correctly"},{"@type":"BreadcrumbList","@id":"https:\/\/www.magetop.com\/blog\/set-magento-2-file-permissions-correctly\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.magetop.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Set Magento 2 File Permissions Correctly"}]},{"@type":"WebSite","@id":"https:\/\/www.magetop.com\/blog\/#website","url":"https:\/\/www.magetop.com\/blog\/","name":"Magetop Blog","description":"Exploring Magento Tips, Tricks, and Trends","publisher":{"@id":"https:\/\/www.magetop.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.magetop.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.magetop.com\/blog\/#organization","name":"Magetop.com","url":"https:\/\/www.magetop.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1","width":475,"height":475,"caption":"Magetop.com"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/MagetopStore","https:\/\/x.com\/MagetopStore","https:\/\/www.linkedin.com\/company\/magetop","https:\/\/www.pinterest.com\/magetop","https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA"]},{"@type":"Person","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7","name":"Aaron LX","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1","caption":"Aaron LX"},"description":"Aaron is a passionate writer, crazy about shopping, eCommerce and trends. Besides his outstanding research skills and a positive mind, Aaron eagerly shares his experience with the readers.","url":"https:\/\/www.magetop.com\/blog\/author\/aaron-lx\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/01\/Set-Magento-2-File-Permissions-Correctly.png?fit=1355%2C753&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/paOdw5-2SA","jetpack-related-posts":[{"id":5609,"url":"https:\/\/www.magetop.com\/blog\/fix-magento-2-500-internal-server-error\/","url_meta":{"origin":11072,"position":0},"title":"How To Fix Magento 2 500 Internal Server Error","author":"Aaron LX","date":"May 14, 2021","format":false,"excerpt":"In this post, I will guide you on\u00a0How To Fix Magento 2 500 Internal Server Error. This error occurs when the server of the website you visit is faulty and cannot provide or display any information or content.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"How To Fix Magento 2 500 Internal Server Error","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Fix-Magento-2-500-Internal-Server-Error.png?fit=1200%2C713&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Fix-Magento-2-500-Internal-Server-Error.png?fit=1200%2C713&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Fix-Magento-2-500-Internal-Server-Error.png?fit=1200%2C713&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Fix-Magento-2-500-Internal-Server-Error.png?fit=1200%2C713&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Fix-Magento-2-500-Internal-Server-Error.png?fit=1200%2C713&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":399,"url":"https:\/\/www.magetop.com\/blog\/how-to-install-magento-with-sample-data\/","url_meta":{"origin":11072,"position":1},"title":"How to install Magento 2 with Sample Data","author":"Adam Roger","date":"November 13, 2019","format":false,"excerpt":"How To Install Magento 2 \u2013 Magento is an ecommerce platform built on open source technology which provides online merchants with a flexible shopping cart system, as well as control over the look, content and functionality of their online store. Magento offers powerful marketing, search engine optimization, and catalog-management tools.\u2026","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"How to install sample data","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/11\/How-to-install-sample-data.png?fit=790%2C420&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/11\/How-to-install-sample-data.png?fit=790%2C420&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/11\/How-to-install-sample-data.png?fit=790%2C420&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2019\/11\/How-to-install-sample-data.png?fit=790%2C420&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":11204,"url":"https:\/\/www.magetop.com\/blog\/fix-magento-2-failed-to-open-stream-error\/","url_meta":{"origin":11072,"position":2},"title":"Fix Failed to Open Stream Error in PluginListGenerator.php in Magento 2","author":"Aaron LX","date":"February 1, 2026","format":false,"excerpt":"When installing or compiling Magento 2, especially on XAMPP environments, you may encounter a \u201cFailed to open stream\u201d error related to PluginListGenerator.php. This issue has been observed in multiple Magento 2 versions, including Magento 2.4.7, and commonly occurs during dependency injection compilation. The error is caused by an invalid cache\u2026","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Fix Failed to Open Stream Error in PluginListGenerator.php in Magento 2","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/02\/Fix-Failed-to-Open-Stream-Error-in-PluginListGenerator.php-in-Magento-2.png?fit=1200%2C667&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/02\/Fix-Failed-to-Open-Stream-Error-in-PluginListGenerator.php-in-Magento-2.png?fit=1200%2C667&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/02\/Fix-Failed-to-Open-Stream-Error-in-PluginListGenerator.php-in-Magento-2.png?fit=1200%2C667&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/02\/Fix-Failed-to-Open-Stream-Error-in-PluginListGenerator.php-in-Magento-2.png?fit=1200%2C667&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/02\/Fix-Failed-to-Open-Stream-Error-in-PluginListGenerator.php-in-Magento-2.png?fit=1200%2C667&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":11622,"url":"https:\/\/www.magetop.com\/blog\/install-hyva-theme-magento-2\/","url_meta":{"origin":11072,"position":3},"title":"How to Install Hyv\u00e4 Theme in Magento 2","author":"Aaron LX","date":"March 30, 2026","format":false,"excerpt":"Performance and speed are the lifeblood of any modern eCommerce store. Over the past few years, the Hyv\u00e4 Theme has completely revolutionized the Magento 2 ecosystem by replacing the heavy, outdated Luma stack (RequireJS, Knockout, jQuery) with a lightweight, blazing-fast combination of Alpine.js and Tailwind CSS.If you are new to\u2026","rel":"","context":"In &quot;Magento 2 Knowledge Base&quot;","block_context":{"text":"Magento 2 Knowledge Base","link":"https:\/\/www.magetop.com\/blog\/magento-2-knowledge-base\/"},"img":{"alt_text":"How to Install Hyv\u00e4 Theme in Magento 2","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Install-Hyva-Theme-in-Magento-2-scaled.png?fit=1200%2C662&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Install-Hyva-Theme-in-Magento-2-scaled.png?fit=1200%2C662&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Install-Hyva-Theme-in-Magento-2-scaled.png?fit=1200%2C662&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Install-Hyva-Theme-in-Magento-2-scaled.png?fit=1200%2C662&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/How-to-Install-Hyva-Theme-in-Magento-2-scaled.png?fit=1200%2C662&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3060,"url":"https:\/\/www.magetop.com\/blog\/top-magento-2-product-attachments-extensions\/","url_meta":{"origin":11072,"position":4},"title":"Top 10 Magento 2 Product Attachments Extensions","author":"Aaron LX","date":"November 3, 2020","format":false,"excerpt":"Magento 2 Product Attachments Extensions allow you to attach files such as manuals, licenses, warranties, \u2026 to any product in the store. This helps customers be provided with the most detailed information about the product they intend to buy. Increase the number of products sold, increase the customer experience. In\u2026","rel":"","context":"In &quot;Magento News&quot;","block_context":{"text":"Magento News","link":"https:\/\/www.magetop.com\/blog\/magento-news\/"},"img":{"alt_text":"Top Magento 2 Product Attachments Extensions","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Product-Attachments-Extensions.jpg?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Product-Attachments-Extensions.jpg?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Product-Attachments-Extensions.jpg?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/11\/Top-Magento-2-Product-Attachments-Extensions.jpg?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":5476,"url":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/","url_meta":{"origin":11072,"position":5},"title":"How To Install Magento 2.4.7 On Ubuntu","author":"Aaron LX","date":"May 14, 2021","format":false,"excerpt":"Magento 2.4.7 has been released with hundreds of quality fixes and enhancements, enhancing GraphQL coverage for custom attributes and resolver caches. Please follow the post\u00a0How To Install Magento 2.4.7 On Ubuntu to install it successfully.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"How To Install Magento 2.4.7 On Ubuntu","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1200%2C667&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1200%2C667&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1200%2C667&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1200%2C667&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1200%2C667&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/11072","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/users\/106"}],"replies":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/comments?post=11072"}],"version-history":[{"count":3,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/11072\/revisions"}],"predecessor-version":[{"id":11075,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/11072\/revisions\/11075"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/media\/11076"}],"wp:attachment":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/media?parent=11072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/categories?post=11072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/tags?post=11072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}