{"id":2241,"date":"2009-08-18T09:04:24","date_gmt":"2009-08-18T06:04:24","guid":{"rendered":"http:\/\/localhost\/helpcentre\/?p=2241"},"modified":"2026-11-06T11:46:54","modified_gmt":"2026-11-06T09:46:54","slug":"chmod","status":"publish","type":"post","link":"https:\/\/xneelo.co.za\/help-centre\/website\/chmod\/","title":{"rendered":"Understanding File and Folder Permissions"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">File and folder permissions are security rules that control who can access, view or change the files and folders on your website.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Your website normally uses permissions that are set automatically when files and folders are created. However, you may need to change them when installing an application or troubleshooting a website error.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Incorrect permissions can cause problems:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Too restrictive:<\/b><span style=\"font-weight: 400;\"> Your website may display a \u201c403 Forbidden\u201d error, images may fail to load, or your application may be unable to save changes.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Too permissive:<\/b><span style=\"font-weight: 400;\"> Users or processes that should not have access may be able to change your files, potentially putting your website at risk.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">You can change permissions using either of the following methods:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>File Manager:<\/b><span style=\"font-weight: 400;\"> Access your website files through the <\/span><a href=\"https:\/\/xneelo.co.za\/help-centre\/website\/how-to-change-file-and-folder-permissions\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">File Manager<\/span><\/a><span style=\"font-weight: 400;\"> in the xneelo Control Panel. This is the easier option if you&#8217;re unfamiliar with server commands.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b><span style=\"font-weight: 400;\"><code>chmod<\/code> <\/span>command:<\/b><span style=\"font-weight: 400;\"> If you&#8217;re comfortable using SSH, you can use the <code>chmod<\/code> command<\/span><span style=\"font-weight: 400;\">\u00a0(short for <\/span><i><span style=\"font-weight: 400;\">change mode<\/span><\/i><span style=\"font-weight: 400;\">) to update permissions.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">This article explains how permissions work, what the permission numbers mean and which settings are commonly used.<\/span><\/p>\n<p><span style=\"font-size: 18px;\"><b>How do file and folder permissions differ?<\/b><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Files and folders use the same three permissions: Read, Write and Execute. However, these permissions work differently depending on whether they&#8217;re applied to a file or folder.<\/span><\/p>\n<table style=\"height: 120px; width: 100%; border: 1px solid #c0c0c0; border-collapse: separate; background-color: #ffffff;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 12.7272%; background-color: #dedcdc;\"><strong>\u00a0Permission<\/strong><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 8.28289%; background-color: #dedcdc;\"><strong>\u00a0Symbol<\/strong><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 35.1515%; background-color: #dedcdc;\"><strong> <b>For a file<\/b><\/strong><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 43.6363%; background-color: #dedcdc;\"><strong> For a folder<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 12.7272%;\">\u00a0Read<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 8.28289%;\">\u00a0r<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 35.1515%;\">Lets you open and view the contents of the file.<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 43.6363%;\">Lets you see the names of files and subfolders inside the folder.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 12.7272%;\">\u00a0Write<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 8.28289%;\">\u00a0w<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 35.1515%;\">Lets you change the contents of a file.<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 43.6363%;\">Lets you create, delete, or rename files inside the folder.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 12.7272%;\">\u00a0Execute<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 8.28289%;\">\u00a0x<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 35.1515%;\">Lets you run the file as a program or script.<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 43.6363%;\">Lets you enter the folder and access files inside it.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>A folder needs Execute permission to allow access to files inside it, even if those files are only being viewed.<br \/>\n<strong><\/strong><\/p>\n<p><strong>Note:<\/strong> Deleting a file depends mainly on the permissions of the folder containing it, rather than the file&#8217;s own Write permission.<\/p>\n<p><span style=\"font-size: 18px;\"><b>Who do permissions apply to?<\/b><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Each file and folder has an owner and an associated group on the server. Permissions apply to three categories:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>User:<\/b><span style=\"font-weight: 400;\"> The owner of the file or folder.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Group:<\/b><span style=\"font-weight: 400;\"> Users who belong to the same group as the file or folder.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Everyone (Other):<\/b><span style=\"font-weight: 400;\"> All other users who don&#8217;t fall into the first two categories.<\/span><\/li>\n<\/ul>\n<p><b>Important:<\/b><span style=\"font-weight: 400;\"> &#8220;Other&#8221; doesn&#8217;t mean everyone visiting your website. It refers to other users or processes on the server. Website visitors don&#8217;t automatically gain direct access to your files because Read permission is enabled.<\/span><\/p>\n<p><span style=\"font-size: 18px;\"><b>Understanding permission numbers<\/b><\/span><\/p>\n<p><span style=\"font-weight: 400;\">When using <code>chmod<\/code>, permissions are often represented by a three-digit number, such as <\/span><b>644<\/b><span style=\"font-weight: 400;\"> or <\/span><b>755<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Each digit represents a category, always in this order:<\/span><\/p>\n<p><b>User \u2192 Group \u2192 Other<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Each permission has a value:<\/span><\/p>\n<table style=\"height: 120px; width: 100%; border: 1px solid #c0c0c0; border-collapse: separate; background-color: #ffffff;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 35.3535%; background-color: #dedcdc;\"><strong>\u00a0Permission<\/strong><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.3131%; background-color: #dedcdc;\"><strong>\u00a0User<\/strong><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.6162%; background-color: #dedcdc;\"><strong>\u00a0Group<\/strong><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.4141%; background-color: #dedcdc;\"><strong>\u00a0Other<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 35.3535%;\">\u00a0Read (r)<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.3131%;\">\u00a04<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.6162%;\">\u00a04<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.4141%;\">\u00a04<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 35.3535%;\">\u00a0Write (w)<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.3131%;\">\u00a02<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.6162%;\">\u00a02<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.4141%;\">\u00a02<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 35.3535%;\">\u00a0Execute (x)<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.3131%;\">\u00a01<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.6162%;\">\u00a01<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.4141%;\">\u00a01<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 35.3535%;\">\u00a0Total (all three)<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.3131%;\">\u00a07<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.6162%;\">\u00a07<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.4141%;\">\u00a07<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">To determine the permissions for each category, add together the values of the actions you want to allow.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For example:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>7 (4 + 2 + 1):<\/b><span style=\"font-weight: 400;\"> Read, write and execute.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>6 (4 + 2):<\/b><span style=\"font-weight: 400;\"> Read and write.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>5 (4 + 1):<\/b><span style=\"font-weight: 400;\"> Read and execute.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>4:<\/b><span style=\"font-weight: 400;\"> Read only.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>0:<\/b><span style=\"font-weight: 400;\"> No permissions.<\/span><\/li>\n<\/ul>\n<p><strong>Example: What does 755 mean?<\/strong><\/p>\n<p>The permission setting 755 gives different levels of access to the owner, group and other users.<\/p>\n<table style=\"height: 120px; width: 100%; border: 1px solid #c0c0c0; border-collapse: separate; background-color: #ffffff;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 25.3535%; background-color: #dedcdc;\"><strong> Category<\/strong><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 19.3939%; background-color: #dedcdc;\"><strong> Number<\/strong><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 33.3333%; background-color: #dedcdc;\"><strong> Permissions<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 25.3535%;\">User (Owner)<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 19.3939%;\">\u00a07<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 33.3333%;\">Read, Write and Execute (4 + 2 + 1)<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 25.3535%;\">Group<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 19.3939%;\">\u00a05<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 33.3333%;\">Read and Execute (4 + 1)<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 25.3535%;\">Other<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 19.3939%;\">\u00a05<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 33.3333%;\">Read and Execute (4 + 1)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">When applied to a folder, this means:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The <\/span><b>owner<\/b><span style=\"font-weight: 400;\"> can view, add, remove and access files inside the folder.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The <\/span><b>group<\/b><span style=\"font-weight: 400;\"> can view the folder&#8217;s contents and access files inside it, but cannot make changes to the folder&#8217;s contents.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Other<\/b><span style=\"font-weight: 400;\"> users or processes can also view and access the folder&#8217;s contents, but cannot make changes to the folder&#8217;s contents.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Access to individual files still depends on the permissions assigned to those files.<\/span><\/p>\n<p><span style=\"font-size: 18px;\"><b>Which permissions should I use?<\/b><\/span><\/p>\n<p><span style=\"font-weight: 400;\">The permissions your website needs depend on your application and hosting configuration. However, the following settings are commonly used:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The permissions your website needs depend on your application and hosting configuration. However, the following settings are commonly used:<\/span><\/p>\n<table style=\"height: 120px; width: 100%; border: 1px solid #c0c0c0; border-collapse: separate; background-color: #ffffff;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 11.4141%; background-color: #dedcdc;\"><strong>Permission<\/strong><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.4142%; background-color: #dedcdc;\"><strong>Common use<\/strong><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 45.2524%; background-color: #dedcdc;\"><strong>What it allows<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 11.4141%;\">644<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.4142%;\">Website files<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 45.2524%;\">The owner can read and change the file. Group and Other can read it.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 11.4141%;\">755<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.4142%;\">Website folders<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 45.2524%;\">The owner has full access. Group and Other can view and access the folder.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 11.4141%;\">600<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 21.4142%;\">Sensitive files<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 45.2524%;\">Only the owner can read and change the file.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; width: 11.4141%; height: 24px;\">777<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; width: 21.4142%; height: 24px;\">Not recommended<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; width: 45.2524%; height: 24px;\">User, Group and Other all have full permissions.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">For most standard website setups, 644 for files and 755 for folders are commonly used starting points.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Some applications require different permissions to function correctly. Always follow your application&#8217;s documentation or consult your web developer before making changes.<\/span><\/p>\n<p><span style=\"font-size: 18px;\"><b>Why would you give \u201cOther\u201d (everyone) read, write, or execute?<\/b><\/span><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">777<\/span><span style=\"font-weight: 400;\"> permission setting gives User, Group and Other full Read, Write and Execute permissions.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Although this may appear to resolve certain permission errors, it can create security risks by allowing unauthorised server processes or compromised applications to change, delete or upload website files.<\/span><\/p>\n<p><b>We strongly recommend avoiding <\/b><b>777<\/b><b> permissions<\/b><span style=\"font-weight: 400;\">, particularly on a live website.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If your website or application isn&#8217;t working because of a permissions issue, identify which permissions are required rather than setting everything to <\/span><span style=\"font-weight: 400;\">777<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-size: 18px;\"><b>Examples of chmod commands<\/b><\/span><\/p>\n<p><span style=\"font-weight: 400;\">The <code>chmod<\/code> command has several options that affect its behaviour, with the most common option being -R to change the permissions of a folder and everything inside it, including files and subfolders. Because files and folders often require different permissions, applying the same setting to everything may cause security or functionality issues.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Only change permissions when necessary, and avoid granting more access than your website or application requires.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The following commands demonstrate how permissions can be changed when connected to your server using SSH.<\/span><\/p>\n<table style=\"height: 120px; width: 100%; border: 1px solid #c0c0c0; border-collapse: separate; background-color: #ffffff;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 19.798%; background-color: #dedcdc;\"><b>Command<\/b><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 33.0303%; background-color: #dedcdc;\"><b>What it does<\/b><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 25.2524%; background-color: #dedcdc;\"><b>Result shown<\/b><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 19.798%;\"><span style=\"font-size: 14px;\"><code><span style=\"font-weight: 400;\">chmod 755 directory<\/span><\/code><\/span><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 33.0303%;\">You have full access; everyone else can open and view the folder<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 25.2524%;\"><span style=\"font-size: 14px;\"><code><span style=\"font-weight: 400;\">drwxr-xr-x ftplogin users directory<\/span><\/code><\/span><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 19.798%;\"><span style=\"font-size: 14px;\"><code><span style=\"font-weight: 400;\">chmod 644 filename<\/span><\/code><\/span><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 33.0303%;\">You can edit the file; everyone else can only view it<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 25.2524%;\"><span style=\"font-size: 14px;\"><code><span style=\"font-weight: 400;\">-rw-r--r-- ftplogin users filename<\/span><\/code><\/span><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 19.798%;\"><span style=\"font-size: 14px;\"><code><span style=\"font-weight: 400;\">chmod 755 directory -R<\/span><\/code><\/span><\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 33.0303%;\">Applies 755 to the folder and everything inside it<\/td>\n<td style=\"border: 1px solid #c0c0c0; padding: 5px; height: 24px; width: 25.2524%;\"><span style=\"font-size: 14px;\"><code>drwxr-xr-x ftplogin users directory<\/code><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false,"plain":"<span >File and folder permissions are security rules that control who can access, view or change the files and folders on your website.<\/span>\r\n\r\n<span >Your website normally uses permissions that are set automatically when files and folders are created. However, you may need to change them when installing an application or troubleshooting a website error.<\/span>\r\n\r\n<span >Incorrect permissions can cause problems:<\/span>\r\n<ul>\r\n \t<li  aria-level=\"1\"><b>Too restrictive:<\/b><span > Your website may display a \u201c403 Forbidden\u201d error, images may fail to load, or your application may be unable to save changes.<\/span><\/li>\r\n \t<li  aria-level=\"1\"><b>Too permissive:<\/b><span > Users or processes that should not have access may be able to change your files, potentially putting your website at risk.<\/span><\/li>\r\n<\/ul>\r\n<span >You can change permissions using either of the following methods:<\/span>\r\n<ul>\r\n \t<li  aria-level=\"1\"><b>File Manager:<\/b><span > Access your website files through the <\/span><a href=\"https:\/\/xneelo.co.za\/help-centre\/website\/how-to-change-file-and-folder-permissions\/\" target=\"_blank\" rel=\"noopener\"><span >File Manager<\/span><\/a><span > in the xneelo Control Panel. This is the easier option if you're unfamiliar with server commands.<\/span><\/li>\r\n \t<li  aria-level=\"1\"><b><span ><code>chmod<\/code> <\/span>command:<\/b><span > If you're comfortable using SSH, you can use the <code>chmod<\/code> command<\/span><span >\u00a0(short for <\/span><i><span >change mode<\/span><\/i><span >) to update permissions.<\/span><\/li>\r\n<\/ul>\r\n<span >This article explains how permissions work, what the permission numbers mean and which settings are commonly used.<\/span>\r\n\r\n<span ><b>How do file and folder permissions differ?<\/b><\/span>\r\n\r\n<span >Files and folders use the same three permissions: Read, Write and Execute. However, these permissions work differently depending on whether they're applied to a file or folder.<\/span>\r\n<table  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr >\r\n<td ><strong>\u00a0Permission<\/strong><\/td>\r\n<td ><strong>\u00a0Symbol<\/strong><\/td>\r\n<td ><strong> <b>For a file<\/b><\/strong><\/td>\r\n<td ><strong> For a folder<\/strong><\/td>\r\n<\/tr>\r\n<tr >\r\n<td >\u00a0Read<\/td>\r\n<td >\u00a0r<\/td>\r\n<td >Lets you open and view the contents of the file.<\/td>\r\n<td >Lets you see the names of files and subfolders inside the folder.<\/td>\r\n<\/tr>\r\n<tr >\r\n<td >\u00a0Write<\/td>\r\n<td >\u00a0w<\/td>\r\n<td >Lets you change the contents of a file.<\/td>\r\n<td >Lets you create, delete, or rename files inside the folder.<\/td>\r\n<\/tr>\r\n<tr >\r\n<td >\u00a0Execute<\/td>\r\n<td >\u00a0x<\/td>\r\n<td >Lets you run the file as a program or script.<\/td>\r\n<td >Lets you enter the folder and access files inside it.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nA folder needs Execute permission to allow access to files inside it, even if those files are only being viewed.\r\n<strong><\/strong>\r\n\r\n<strong>Note:<\/strong> Deleting a file depends mainly on the permissions of the folder containing it, rather than the file's own Write permission.\r\n\r\n<span ><b>Who do permissions apply to?<\/b><\/span>\r\n\r\n<span >Each file and folder has an owner and an associated group on the server. Permissions apply to three categories:<\/span>\r\n<ul>\r\n \t<li  aria-level=\"1\"><b>User:<\/b><span > The owner of the file or folder.<\/span><\/li>\r\n \t<li  aria-level=\"1\"><b>Group:<\/b><span > Users who belong to the same group as the file or folder.<\/span><\/li>\r\n \t<li  aria-level=\"1\"><b>Everyone (Other):<\/b><span > All other users who don't fall into the first two categories.<\/span><\/li>\r\n<\/ul>\r\n<b>Important:<\/b><span > \"Other\" doesn't mean everyone visiting your website. It refers to other users or processes on the server. Website visitors don't automatically gain direct access to your files because Read permission is enabled.<\/span>\r\n\r\n<span ><b>Understanding permission numbers<\/b><\/span>\r\n\r\n<span >When using <code>chmod<\/code>, permissions are often represented by a three-digit number, such as <\/span><b>644<\/b><span > or <\/span><b>755<\/b><span >.<\/span>\r\n\r\n<span >Each digit represents a category, always in this order:<\/span>\r\n\r\n<b>User \u2192 Group \u2192 Other<\/b>\r\n\r\n<span >Each permission has a value:<\/span>\r\n<table  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr >\r\n<td ><strong>\u00a0Permission<\/strong><\/td>\r\n<td ><strong>\u00a0User<\/strong><\/td>\r\n<td ><strong>\u00a0Group<\/strong><\/td>\r\n<td ><strong>\u00a0Other<\/strong><\/td>\r\n<\/tr>\r\n<tr >\r\n<td >\u00a0Read (r)<\/td>\r\n<td >\u00a04<\/td>\r\n<td >\u00a04<\/td>\r\n<td >\u00a04<\/td>\r\n<\/tr>\r\n<tr >\r\n<td >\u00a0Write (w)<\/td>\r\n<td >\u00a02<\/td>\r\n<td >\u00a02<\/td>\r\n<td >\u00a02<\/td>\r\n<\/tr>\r\n<tr >\r\n<td >\u00a0Execute (x)<\/td>\r\n<td >\u00a01<\/td>\r\n<td >\u00a01<\/td>\r\n<td >\u00a01<\/td>\r\n<\/tr>\r\n<tr >\r\n<td >\u00a0Total (all three)<\/td>\r\n<td >\u00a07<\/td>\r\n<td >\u00a07<\/td>\r\n<td >\u00a07<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<span >To determine the permissions for each category, add together the values of the actions you want to allow.<\/span>\r\n\r\n<span >For example:<\/span>\r\n<ul>\r\n \t<li  aria-level=\"1\"><b>7 (4 + 2 + 1):<\/b><span > Read, write and execute.<\/span><\/li>\r\n \t<li  aria-level=\"1\"><b>6 (4 + 2):<\/b><span > Read and write.<\/span><\/li>\r\n \t<li  aria-level=\"1\"><b>5 (4 + 1):<\/b><span > Read and execute.<\/span><\/li>\r\n \t<li  aria-level=\"1\"><b>4:<\/b><span > Read only.<\/span><\/li>\r\n \t<li  aria-level=\"1\"><b>0:<\/b><span > No permissions.<\/span><\/li>\r\n<\/ul>\r\n<strong>Example: What does 755 mean?<\/strong>\r\n\r\nThe permission setting 755 gives different levels of access to the owner, group and other users.\r\n<table  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr >\r\n<td ><strong> Category<\/strong><\/td>\r\n<td ><strong> Number<\/strong><\/td>\r\n<td ><strong> Permissions<\/strong><\/td>\r\n<\/tr>\r\n<tr >\r\n<td >User (Owner)<\/td>\r\n<td >\u00a07<\/td>\r\n<td >Read, Write and Execute (4 + 2 + 1)<\/td>\r\n<\/tr>\r\n<tr >\r\n<td >Group<\/td>\r\n<td >\u00a05<\/td>\r\n<td >Read and Execute (4 + 1)<\/td>\r\n<\/tr>\r\n<tr >\r\n<td >Other<\/td>\r\n<td >\u00a05<\/td>\r\n<td >Read and Execute (4 + 1)<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<span >When applied to a folder, this means:<\/span>\r\n<ul>\r\n \t<li  aria-level=\"1\"><span >The <\/span><b>owner<\/b><span > can view, add, remove and access files inside the folder.<\/span><\/li>\r\n \t<li  aria-level=\"1\"><span >The <\/span><b>group<\/b><span > can view the folder's contents and access files inside it, but cannot make changes to the folder's contents.<\/span><\/li>\r\n \t<li  aria-level=\"1\"><b>Other<\/b><span > users or processes can also view and access the folder's contents, but cannot make changes to the folder's contents.<\/span><\/li>\r\n<\/ul>\r\n<span >Access to individual files still depends on the permissions assigned to those files.<\/span>\r\n\r\n<span ><b>Which permissions should I use?<\/b><\/span>\r\n\r\n<span >The permissions your website needs depend on your application and hosting configuration. However, the following settings are commonly used:<\/span>\r\n\r\n<span >The permissions your website needs depend on your application and hosting configuration. However, the following settings are commonly used:<\/span>\r\n<table  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr >\r\n<td ><strong>Permission<\/strong><\/td>\r\n<td ><strong>Common use<\/strong><\/td>\r\n<td ><strong>What it allows<\/strong><\/td>\r\n<\/tr>\r\n<tr >\r\n<td >644<\/td>\r\n<td >Website files<\/td>\r\n<td >The owner can read and change the file. Group and Other can read it.<\/td>\r\n<\/tr>\r\n<tr >\r\n<td >755<\/td>\r\n<td >Website folders<\/td>\r\n<td >The owner has full access. Group and Other can view and access the folder.<\/td>\r\n<\/tr>\r\n<tr >\r\n<td >600<\/td>\r\n<td >Sensitive files<\/td>\r\n<td >Only the owner can read and change the file.<\/td>\r\n<\/tr>\r\n<tr >\r\n<td >777<\/td>\r\n<td >Not recommended<\/td>\r\n<td >User, Group and Other all have full permissions.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<span >For most standard website setups, 644 for files and 755 for folders are commonly used starting points.<\/span>\r\n\r\n<span >Some applications require different permissions to function correctly. Always follow your application's documentation or consult your web developer before making changes.<\/span>\r\n\r\n<span ><b>Why would you give \u201cOther\u201d (everyone) read, write, or execute?<\/b><\/span>\r\n\r\n<span >The <\/span><span >777<\/span><span > permission setting gives User, Group and Other full Read, Write and Execute permissions.<\/span>\r\n\r\n<span >Although this may appear to resolve certain permission errors, it can create security risks by allowing unauthorised server processes or compromised applications to change, delete or upload website files.<\/span>\r\n\r\n<b>We strongly recommend avoiding <\/b><b>777<\/b><b> permissions<\/b><span >, particularly on a live website.<\/span>\r\n\r\n<span >If your website or application isn't working because of a permissions issue, identify which permissions are required rather than setting everything to <\/span><span >777<\/span><span >.<\/span>\r\n\r\n<span ><b>Examples of chmod commands<\/b><\/span>\r\n\r\n<span >The <code>chmod<\/code> command has several options that affect its behaviour, with the most common option being -R to change the permissions of a folder and everything inside it, including files and subfolders. Because files and folders often require different permissions, applying the same setting to everything may cause security or functionality issues.<\/span>\r\n\r\n<span >Only change permissions when necessary, and avoid granting more access than your website or application requires.<\/span>\r\n\r\n<span >The following commands demonstrate how permissions can be changed when connected to your server using SSH.<\/span>\r\n<table  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr >\r\n<td ><b>Command<\/b><\/td>\r\n<td ><b>What it does<\/b><\/td>\r\n<td ><b>Result shown<\/b><\/td>\r\n<\/tr>\r\n<tr >\r\n<td ><span ><code><span >chmod 755 directory<\/span><\/code><\/span><\/td>\r\n<td >You have full access; everyone else can open and view the folder<\/td>\r\n<td ><span ><code><span >drwxr-xr-x ftplogin users directory<\/span><\/code><\/span><\/td>\r\n<\/tr>\r\n<tr >\r\n<td ><span ><code><span >chmod 644 filename<\/span><\/code><\/span><\/td>\r\n<td >You can edit the file; everyone else can only view it<\/td>\r\n<td ><span ><code><span >-rw-r--r-- ftplogin users filename<\/span><\/code><\/span><\/td>\r\n<\/tr>\r\n<tr >\r\n<td ><span ><code><span >chmod 755 directory -R<\/span><\/code><\/span><\/td>\r\n<td >Applies 755 to the folder and everything inside it<\/td>\r\n<td ><span ><code>drwxr-xr-x ftplogin users directory<\/code><\/span><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>"},"excerpt":{"rendered":"<p>File and folder permissions can be changed using either the File Manager within the xneelo Control Panel or the chmod command.<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"lsx_disable_title":"0","_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","footnotes":""},"categories":[168,180,166],"tags":[24755,24747,17405,943,947,949],"topics":[],"class_list":["post-2241","post","type-post","status-publish","format-standard","hentry","category-managing-website","category-mysql","category-website","tag-change-permissions","tag-read-write-execute","tag-file-and-folder-permissions","tag-permissions","tag-chmod","tag-file-permissions"],"acf":[],"additional_meta":{"category_title":[{"term_id":168,"name":"Managing your Website","slug":"managing-website","term_group":0,"term_taxonomy_id":168,"taxonomy":"category","description":"Managing your Website","parent":166,"count":52,"filter":"raw","term_order":"83","cat_ID":168,"category_count":52,"category_description":"Managing your Website","cat_name":"Managing your Website","category_nicename":"managing-website","category_parent":166},{"term_id":180,"name":"MySQL","slug":"mysql","term_group":0,"term_taxonomy_id":180,"taxonomy":"category","description":"Using MySQL for web applications ","parent":168,"count":9,"filter":"raw","term_order":"92","cat_ID":180,"category_count":9,"category_description":"Using MySQL for web applications ","cat_name":"MySQL","category_nicename":"mysql","category_parent":168},{"term_id":166,"name":"Website","slug":"website","term_group":0,"term_taxonomy_id":166,"taxonomy":"category","description":"About your Website(s)","parent":0,"count":172,"filter":"raw","term_order":"120","cat_ID":166,"category_count":172,"category_description":"About your Website(s)","cat_name":"Website","category_nicename":"website","category_parent":0}],"tag_title":[{"term_id":24755,"name":"change permissions","slug":"change-permissions","term_group":0,"term_taxonomy_id":24755,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw","term_order":"0"},{"term_id":24747,"name":"read write execute","slug":"read-write-execute","term_group":0,"term_taxonomy_id":24747,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw","term_order":"1"},{"term_id":17405,"name":"file and folder permissions","slug":"file-and-folder-permissions","term_group":0,"term_taxonomy_id":17405,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw","term_order":"2418"},{"term_id":943,"name":"permissions","slug":"permissions","term_group":0,"term_taxonomy_id":943,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw","term_order":"2725"},{"term_id":947,"name":"chmod","slug":"chmod","term_group":0,"term_taxonomy_id":947,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw","term_order":"2778"},{"term_id":949,"name":"file permissions","slug":"file-permissions","term_group":0,"term_taxonomy_id":949,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw","term_order":"2801"}]},"featured_image_src":null,"author_info":{"display_name":"marketing","author_link":"https:\/\/xneelo.co.za\/help-centre\/author\/marketing\/","author_avatar":"https:\/\/secure.gravatar.com\/avatar\/a6ea315e112423b2b955cb020fbce2b0835956c6ad85ff0f13f1db298977eaaa?s=96&d=mm&r=g"},"_links":{"self":[{"href":"https:\/\/xneelo.co.za\/help-centre\/wp-json\/wp\/v2\/posts\/2241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xneelo.co.za\/help-centre\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xneelo.co.za\/help-centre\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xneelo.co.za\/help-centre\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/xneelo.co.za\/help-centre\/wp-json\/wp\/v2\/comments?post=2241"}],"version-history":[{"count":0,"href":"https:\/\/xneelo.co.za\/help-centre\/wp-json\/wp\/v2\/posts\/2241\/revisions"}],"wp:attachment":[{"href":"https:\/\/xneelo.co.za\/help-centre\/wp-json\/wp\/v2\/media?parent=2241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xneelo.co.za\/help-centre\/wp-json\/wp\/v2\/categories?post=2241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xneelo.co.za\/help-centre\/wp-json\/wp\/v2\/tags?post=2241"},{"taxonomy":"topics","embeddable":true,"href":"https:\/\/xneelo.co.za\/help-centre\/wp-json\/wp\/v2\/topics?post=2241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}