{"id":2354,"date":"2011-09-16T05:44:57","date_gmt":"2011-09-16T09:44:57","guid":{"rendered":"https:\/\/webhostinggeeks.com\/blog\/?p=2354"},"modified":"2021-10-18T10:57:40","modified_gmt":"2021-10-18T14:57:40","slug":"cpanel-change-file-permissions","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/blog\/cpanel-change-file-permissions\/","title":{"rendered":"Using cPanel to Change File Permissions: How and Why?"},"content":{"rendered":"<p>One option that you might have seen when exploring <a href=\"https:\/\/cpanel.net\/\" target=\"_blank\" rel=\"noopener\">cPanel<\/a> is the ability to change your file permissions.\u00a0 You may know that setting file permissions is important to security, but you may have been overwhelmed by the number of options.\u00a0 So let&#8217;s take a quick refresher course on this topic, because you are right: it is important.<\/p>\n<p>First, let&#8217;s make sure everyone is up to speed.\u00a0 To set a file&#8217;s permissions, first go to the File Manager, click the name of the file (or directory) that you want to adjust, and on the top menu on the File Permissions page you&#8217;ll see a link that says \u201cChange Permissions\u201d.\u00a0 Click on it and let&#8217;s get started.<\/p>\n<p><iframe width=\"660\" height=\"315\" data-src=\"https:\/\/www.youtube.com\/embed\/x-V5RZJdcPs\" frameborder=\"0\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe><\/p>\n<p><strong>Three user levels<\/strong><\/p>\n<p>There are three user types.\u00a0 First the user called \u201cUser,\u201d which is whoever is listed as the owner of the file.\u00a0 Skipping the second for a moment, the third is \u201cWorld,\u201d meaning anyone who might have the ability to access this file: other users on your server, server applications, or external users if the file is a web page being accessed across the web.<\/p>\n<p>The second, \u201cGroup,\u201d takes some explanation.\u00a0 Sometimes you want to restrict certain types of access to only certain people.\u00a0 For these people, you create a \u201cgroup.\u201d\u00a0 Each file already belongs to some group by default.\u00a0 Whatever group it does belong to, any users listed as part of that group have the access rights that you afford to them, which can be different from those associated with either \u201cUser\u201d or \u201cWorld.\u201d<\/p>\n<p><strong>Three access types<\/strong><\/p>\n<p>The access types are a little more well known.\u00a0 \u201cRead\u201d means just that: you (\u201cyou\u201d meaning whoever is trying to access the file) can see the file and its contents.\u00a0 \u201cWrite\u201d means you can alter the file&#8217;s contents.\u00a0 \u201cExecute\u201d means that you can run the file as a program.<\/p>\n<p><strong>Three times three equals \u2026 a lot of questions<\/strong><\/p>\n<p>A file thus has nine (3 times 3) total permissions that it can turn on or off.\u00a0 Your goal in deciding which of these to set how is to make sure that everyone you want to access the file can, and everyone you don&#8217;t can&#8217;t.\u00a0 How do you?<\/p>\n<p><strong><\/strong>This one area in which you are going to want to contact your service provider.\u00a0 Your files are often not just accessed by web surfers, but also by a host of on-server resources, and sometimes some of them will break if your files aren&#8217;t set the way they should be.\u00a0 One example is as follows; If you have a directory in which logs of hits to your web site are kept, and you set the directory to give no one but you any permissions, then the server might not be able to send your your logs each night.<\/p>\n<p><strong>When in doubt, make it read-only<\/strong><\/p>\n<p>A good rule of thumb is that you want to make sure that you always have full permissions, but hold the group and world access levels to read-only.\u00a0 This reduces the chance that anyone can fool around with your site, but still leaves it accessible to anyone who truly just needs to read its contents.<\/p>\n<p>Nonetheless, check your <a href=\"https:\/\/webhostinggeeks.com\/best-cpanel-hosting\">cPanel web host<\/a> online documentation as they will often have information listed about which files and directories need which settings.\u00a0 If you don&#8217;t see what you&#8217;re looking for there, ask them.\u00a0 Trust me, bad file settings can potentially be just as much of a headache for them as it could be for you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One option that you might have seen when exploring cPanel is the ability to change your file permissions.\u00a0 You may know that setting file permissions is important to security, but&#8230;<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[8],"tags":[20,3926,1564],"class_list":["post-2354","post","type-post","status-publish","format-standard","hentry","category-control-panels","tag-cpanel","tag-files","tag-permissions"],"views":78,"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/posts\/2354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/comments?post=2354"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/posts\/2354\/revisions"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/media?parent=2354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/categories?post=2354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/blog\/wp-json\/wp\/v2\/tags?post=2354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}