{"id":17549,"date":"2026-04-20T16:44:32","date_gmt":"2026-04-20T11:14:32","guid":{"rendered":"https:\/\/www.skynats.com\/blog\/?p=17549"},"modified":"2026-04-20T16:44:35","modified_gmt":"2026-04-20T11:14:35","slug":"ftp-permission-denied-acl-fix","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/ftp-permission-denied-acl-fix\/","title":{"rendered":"How to Fix FTP Permission Denied in Linux (ACL)"},"content":{"rendered":"\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-introduction\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While working with FTP (such as FileZilla) on <a href=\"https:\/\/www.linux.org\/\" type=\"link\" id=\"https:\/\/www.linux.org\/\" target=\"_blank\" rel=\"noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-secondary-color\">Linux<\/mark><\/a> servers, you may encounter a situation where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can upload new files<\/li>\n\n\n\n<li>You can create directories<\/li>\n\n\n\n<li>But you cannot overwrite existing files, receiving a <strong>\u201cpermission denied\u201d error<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This issue usually occurs due to <strong>ACL (Access Control List) restrictions<\/strong>, where the ACL mask limits write permissions\u2014even if standard Linux permissions (chmod\/chown) appear correct.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At first glance, standard file permissions (chmod) and ownership (chown) may appear correct. However, the root cause in many such cases is related to Access Control Lists (ACL), which can override traditional permission settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the issue is related to connectivity rather than permissions, you may encounter SFTP problems like <a href=\"https:\/\/www.skynats.com\/blog\/solving-sftp-econnrefused-connection-refused-by-server-error\/\" type=\"link\" id=\"https:\/\/www.skynats.com\/blog\/solving-sftp-econnrefused-connection-refused-by-server-error\/\">SFTP connection refused error<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\">What is FTP Permission Denied Error?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>FTP \u201copen for write: permission denied\u201d error<\/strong> occurs when a user tries to modify or overwrite an existing file but lacks effective write permissions on the server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Even when directory and file permissions seem correct, hidden permission layers like ACL can block write access\u2014this is one of the most common FTP errors in Linux environments affecting file operations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\">Problem Overview<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this case:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The FTP user (developer) had access to the directory<\/li>\n\n\n\n<li>Directory permissions were set correctly (755 or 775)<\/li>\n\n\n\n<li>File permissions also looked normal<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">However, checking ACL revealed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#getfacl controllers\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>user:developer:rwx              #effective:r-x\nmask::r-x<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Even though the user had rwx, the effective permission was reduced to r-x due to the ACL mask.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This prevented the user from writing or overwriting files.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\">Why This Happens (Root Cause)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">ACL introduces an additional permission layer, and in some environments, security mechanisms like <a href=\"https:\/\/www.skynats.com\/blog\/set-up-selinux-on-centos\/\" type=\"link\" id=\"https:\/\/www.skynats.com\/blog\/set-up-selinux-on-centos\/\">SELinux configuration in Linux<\/a> can further restrict file access beyond standard permissions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>mask defines the maximum allowed permissions<\/strong><\/li>\n\n\n\n<li>If the mask is restrictive (e.g., r-x), it overrides user permissions<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">So even if:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>user:developer:rwx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It becomes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>effective:r-x<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">No write access \u2192 FTP overwrite fails<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-how-to-fix-ftp-permission-denied-error-step-by-step\"><strong>How to Fix FTP Permission Denied Error (Step-by-Step)<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Step 1: Check ACL Permissions<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#getfacl \/var\/www\/your-project-path<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Look for:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mask::r-x\n#effective:r-x<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-step-2-fix-the-acl-mask\"><strong>Step 2: Fix the ACL Mask<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Update the mask to allow write access:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#setfacl -m mask:rwx \/var\/www\/your-project-path<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-step-3-apply-permissions-recursively-if-needed\"><strong>Step 3: Apply Permissions Recursively (if needed)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#setfacl -R -m u:developer:rwx \/var\/www\/your-project-path\n#setfacl -R -m mask:rwx \/var\/www\/your-project-path<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-step-4-optional-remove-acl-completely\"><strong>Step 4: (Optional) Remove ACL Completely<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If ACL is not required in your setup, it\u2019s better to remove it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#setfacl -bR \/var\/www\/your-project-path<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This restores standard Linux permission behavior and removes the + sign from ls -l.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> ACL can silently block write access even when traditional permissions look correct.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-real-world-insight\">Real-World Insight<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In many production environments, this issue commonly appears when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Multiple users or deployment tools modify permissions<\/li>\n\n\n\n<li>Default ACLs are applied automatically on directories<\/li>\n\n\n\n<li>CI\/CD pipelines override permission settings<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Ignoring ACL can lead to repeated FTP failures even after fixing chmod\/chown.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-key-takeaways\"><strong>Key Takeaways<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>FTP overwrite errors are often caused by <strong>ACL mask restrictions<\/strong><\/li>\n\n\n\n<li>Standard permissions (chmod\/chown) may not reflect actual access<\/li>\n\n\n\n<li>Always check ACL using <code>getfacl<\/code><\/li>\n\n\n\n<li>Fix using <code>setfacl -m mask:rwx<\/code> or remove ACL entirely<\/li>\n\n\n\n<li>Understanding ACL ensures stable and predictable server behavior<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">FTP upload issues\u2014especially when only overwriting fails\u2014are often caused by hidden ACL restrictions rather than basic permission misconfigurations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By identifying and correcting the ACL mask, or removing ACL entirely, you can restore proper file write access and ensure smooth FTP operations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Understanding how ACL interacts with standard permissions is essential for maintaining stable and predictable server behavior in Linux environments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re facing persistent server permission issues or need expert assistance with <a href=\"https:\/\/www.skynats.com\/linux-server-management\">Linux server management<\/a>, consider professional support to ensure secure and error-free operations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction While working with FTP (such as FileZilla) on Linux servers, you may encounter a situation where: This issue usually occurs due to ACL (Access Control List) restrictions, where the ACL mask limits write permissions\u2014even if standard Linux permissions (chmod\/chown) appear correct. At first glance, standard file permissions (chmod) and ownership (chown) may appear correct. [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1289,1286,1292,1288,1287,1291,1290],"class_list":["post-17549","post","type-post","status-publish","format-standard","hentry","category-blog","tag-file-permissions-linux","tag-ftp-error","tag-ftp-issues","tag-ftp-permission-denied","tag-linux-permissions","tag-linux-server-issues","tag-server-troubleshooting"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17549","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=17549"}],"version-history":[{"count":1,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17549\/revisions"}],"predecessor-version":[{"id":17551,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17549\/revisions\/17551"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=17549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=17549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=17549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}