{"id":1965,"date":"2024-01-19T01:35:15","date_gmt":"2024-01-19T00:35:15","guid":{"rendered":"https:\/\/hoganhost.com.ng\/blog\/?p=1965"},"modified":"2024-08-12T13:22:20","modified_gmt":"2024-08-12T12:22:20","slug":"reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel","status":"publish","type":"post","link":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/","title":{"rendered":"Reset File and Folder Permissions and Ownership for a user account in Cpanel"},"content":{"rendered":"<div class=\"kb-article-title\">\n<h2><img fetchpriority=\"high\" decoding=\"async\" class=\"alignleft wp-image-1967\" src=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel-300x300.jpg\" alt=\"\" width=\"425\" height=\"425\" srcset=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel-300x300.jpg 300w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel-1024x1024.jpg 1024w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel-150x150.jpg 150w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel-768x768.jpg 768w, https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel.jpg 1080w\" sizes=\"(max-width: 425px) 100vw, 425px\" \/><\/h2>\n<h2>Reset File and Folder Permissions and Ownership for a user account in Cpanel<\/h2>\n<\/div>\n<div class=\"kb-article-content\">\n<p>Use this script to reset the permissions and ownership of files and folders on a Cpanel user account. This script will iterate through a users Cpanel account files in public_html and set the folder to 0755 and files to 0644.<\/p>\n<p><strong>Why Use This Script?<\/strong><br \/>\nSometimes permissions and ownership of folders and files can get conflicted, especially if you are moving accounts to different servers or renaming a Cpanel account. Also, account owners might mistakingly set a folder to 777 which is bad news and unnecessary on a Cpanel server.<\/p>\n<p><strong>NOTE: Before you start you need:<\/strong><\/p>\n<p>1. Logged in as root user to the WHM server with SSH<br \/>\n2. Know the user name for the account you wish to reset<br \/>\n3. Have already installed the fixperms.sh script at \/root\/fixperms.sh.<\/p>\n<p><em>Replace {username} with the username you wish to repair.<\/em><\/p>\n<pre class=\"language-markup\"><code>\/root\/fixperms.sh {username}<\/code><\/pre>\n<p>With the command below you can make a server-wide fix which will iterate through all the users on your server and repair permissions. WARNING: if you have a lot of accounts on the server, this can take a little while.<\/p>\n<pre class=\"language-markup\"><code>for i in `ls -A \/var\/cpanel\/users` ; do .\/root\/fixperms.sh $i ; done<\/code><\/pre>\n<hr \/>\n<p><strong>How to install fixperms.sh on your server using ssh<\/strong><\/p>\n<p><strong>Below is the script to install on WHM server.<\/strong><\/p>\n<p>Just install it to \/root\/ on your server and called it fixperms.sh<\/p>\n<p><em>Thank you to <a href=\"https:\/\/www.hoganhost.com.ng\" target=\"_blank\" rel=\"noopener\">hoganhost.com.ng<\/a>\u00a0 for this script.<\/em><\/p>\n<pre class=\"language-markup\"><code>#######################################################\r\n#!\/bin\/bash\r\n# Script to fix permissions of accounts\r\n# Written by: Joseph Effiok Hogan\r\n# https:\/\/hoganhost.com.ng\r\n \r\nif [ \"$#\" -lt \"1\" ];then\r\n        echo \"Must specify user\"\r\n        exit;\r\nfi\r\n \r\nUSER=$@\r\n \r\nfor user in $USER\r\ndo\r\n \r\n        HOMEDIR=$(grep $user \/etc\/passwd | cut -d: -f6)\r\n \r\n        if [ ! -f \/var\/cpanel\/users\/$user ]; then\r\n                echo \"$user user file missing, likely an invalid user\"\r\n \r\n        elif [ \"$HOMEDIR\" == \"\" ];then\r\n                echo \"Couldn't determine home directory for $user\"\r\n \r\n        else\r\n \r\n                echo \"Setting ownership for user $user\"\r\n \r\n                        chown -R $user:$user $HOMEDIR\r\n                        chmod 711 $HOMEDIR\r\n                        chown $user:nobody $HOMEDIR\/public_html $HOMEDIR\/.htpasswds\r\n                        chown $user:mail $HOMEDIR\/etc $HOMEDIR\/etc\/*\/shadow $HOMEDIR\/etc\/*\/passwd\r\n \r\n                echo \"Setting permissions for user $USER\"\r\n \r\n                      find $HOMEDIR -type f -exec chmod 644 {} \\; -print\r\n                      find $HOMEDIR -type d -exec chmod 755 {} \\; -print\r\n                      find $HOMEDIR -type d -name cgi-bin -exec chmod 755 {} \\; -print\r\n                      find $HOMEDIR -type f \\( -name \u201c*.pl\u201d -o -name \u201c*.perl\u201d \\) -exec chmod 755 {} \\; -print\r\n                fi\r\ndone\r\n#######################################################<\/code><\/pre>\n<\/div>\n<p><strong>OR<\/strong><\/p>\n<div class=\"kb-article-content\">\n<p><em>you can also use the below code to install fixperms.sh on your server using ssh access<\/em><\/p>\n<ol>\n<li>Login to your server using ssh<\/li>\n<li>type nano fixperms.sh<\/li>\n<li>and paste the below code<\/li>\n<\/ol>\n<pre class=\"language-markup\">[QUOTE]#!\/bin\/bash if [ \"$#\" -lt \"1\" ];then echo \"Must specify user\" exit; fi USER=$@ for user in $USER do HOMEDIR=$(grep $user \/etc\/passwd | cut -d: -f6) if [ ! -f \/var\/cpanel\/users\/$user ]; then echo \"$user user file missing, likely an invalid user\" elif [ \"$HOMEDIR\" == \"\" ];then echo \"Couldn't determine home directory for $user\" else echo \"Setting ownership for user $user\" chown -R $user:$user $HOMEDIR chmod 711 $HOMEDIR chown $user:nobody $HOMEDIR\/public_html $HOMEDIR\/.htpasswds chown $user:mail $HOMEDIR\/etc $HOMEDIR\/etc\/*\/shadow $HOMEDIR\/etc\/*\/passwd echo \"Setting permissions for user $USER\" find $HOMEDIR -type f -exec chmod 644 {} \\; -print find $HOMEDIR -type d -exec chmod 755 {} \\; -print find $HOMEDIR -type d -name cgi-bin -exec chmod 755 {} \\; -print find $HOMEDIR -type f \\( -name \"*.pl\" -o -name \"*.perl\" \\) -exec chmod 755 {} \\; -print fi done<\/pre>\n<\/div>\n<p><i class=\"gmail-fas gmail-fa-tag\">then control+X to close, and Y to save. then whenever you have permissions problems just ssh to server and type:\u00a0<b>sh fixperms.sh USERNAME<\/b>\u00a0(replace USERNAME with the username of the Cpanel user with the issue) this will fix the permissions of the users account.<\/i><\/p>\n<article id=\"post-1955\" class=\"post-1955 post type-post status-publish format-standard has-post-thumbnail hentry category-cloudlinux-os ast-article-single\">\n<div class=\"ast-post-format- single-layout-1\">\n<div class=\"entry-content clear\">\n<p style=\"text-align: left;\">Check out our web hosting service\u00a0<a href=\"https:\/\/hoganhost.com.ng\/\">hoganhost.com.ng<\/a><\/p>\n<\/div>\n<\/div>\n<\/article>\n<nav class=\"navigation post-navigation\" role=\"navigation\" aria-label=\"Posts\"><\/nav>\n","protected":false},"excerpt":{"rendered":"<p>Reset File and Folder Permissions and Ownership for a user account in Cpanel Use this script to reset the permissions [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1967,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4,32,5],"tags":[],"class_list":["post-1965","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","category-ssh","category-whm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Reset File and Folder Permissions and Ownership for a user account in Cpanel<\/title>\n<meta name=\"description\" content=\"Use this script to reset the permissions and ownership of files and folders on a Cpanel user account. This script will iterate through a\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reset File and Folder Permissions and Ownership for a user account in Cpanel\" \/>\n<meta property=\"og:description\" content=\"Use this script to reset the permissions and ownership of files and folders on a Cpanel user account. This script will iterate through a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"HoganHost blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/HoganHost\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-19T00:35:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-12T12:22:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1080\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Abigal okon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hoganhostng\" \/>\n<meta name=\"twitter:site\" content=\"@hoganhostng\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abigal okon\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/\"},\"author\":{\"name\":\"Abigal okon\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/af16a18c6cc966b92a6cb13b500f3f0a\"},\"headline\":\"Reset File and Folder Permissions and Ownership for a user account in Cpanel\",\"datePublished\":\"2024-01-19T00:35:15+00:00\",\"dateModified\":\"2024-08-12T12:22:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/\"},\"wordCount\":330,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel.jpg\",\"articleSection\":[\"Cpanel\",\"SSH\",\"whm\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/\",\"url\":\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/\",\"name\":\"Reset File and Folder Permissions and Ownership for a user account in Cpanel\",\"isPartOf\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel.jpg\",\"datePublished\":\"2024-01-19T00:35:15+00:00\",\"dateModified\":\"2024-08-12T12:22:20+00:00\",\"description\":\"Use this script to reset the permissions and ownership of files and folders on a Cpanel user account. This script will iterate through a\",\"breadcrumb\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#primaryimage\",\"url\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel.jpg\",\"contentUrl\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel.jpg\",\"width\":1080,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hoganhost.com.ng\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Reset File and Folder Permissions and Ownership for a user account in Cpanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#website\",\"url\":\"https:\/\/hoganhost.com.ng\/blog\/\",\"name\":\"HoganHost blog\",\"description\":\"Keeping you connected to everything from HoganHost\",\"publisher\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hoganhost.com.ng\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#organization\",\"name\":\"HoganHost\",\"url\":\"https:\/\/hoganhost.com.ng\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2022\/09\/hogan-host.png\",\"contentUrl\":\"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2022\/09\/hogan-host.png\",\"width\":466,\"height\":387,\"caption\":\"HoganHost\"},\"image\":{\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/HoganHost\",\"https:\/\/x.com\/hoganhostng\",\"https:\/\/instagram.com\/officialhoganhost\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/af16a18c6cc966b92a6cb13b500f3f0a\",\"name\":\"Abigal okon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ef2272070d016c06ee69b30adce7c4e4b4faaa5c899c4b9224a5b1a43b1fb8d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ef2272070d016c06ee69b30adce7c4e4b4faaa5c899c4b9224a5b1a43b1fb8d0?s=96&d=mm&r=g\",\"caption\":\"Abigal okon\"},\"sameAs\":[\"https:\/\/hoganhost.com.ng\/blog\"],\"url\":\"https:\/\/hoganhost.com.ng\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Reset File and Folder Permissions and Ownership for a user account in Cpanel","description":"Use this script to reset the permissions and ownership of files and folders on a Cpanel user account. This script will iterate through a","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:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"Reset File and Folder Permissions and Ownership for a user account in Cpanel","og_description":"Use this script to reset the permissions and ownership of files and folders on a Cpanel user account. This script will iterate through a","og_url":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/","og_site_name":"HoganHost blog","article_publisher":"https:\/\/facebook.com\/HoganHost","article_published_time":"2024-01-19T00:35:15+00:00","article_modified_time":"2024-08-12T12:22:20+00:00","og_image":[{"width":1080,"height":1080,"url":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel.jpg","type":"image\/jpeg"}],"author":"Abigal okon","twitter_card":"summary_large_image","twitter_creator":"@hoganhostng","twitter_site":"@hoganhostng","twitter_misc":{"Written by":"Abigal okon","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#article","isPartOf":{"@id":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/"},"author":{"name":"Abigal okon","@id":"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/af16a18c6cc966b92a6cb13b500f3f0a"},"headline":"Reset File and Folder Permissions and Ownership for a user account in Cpanel","datePublished":"2024-01-19T00:35:15+00:00","dateModified":"2024-08-12T12:22:20+00:00","mainEntityOfPage":{"@id":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/"},"wordCount":330,"commentCount":0,"publisher":{"@id":"https:\/\/hoganhost.com.ng\/blog\/#organization"},"image":{"@id":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel.jpg","articleSection":["Cpanel","SSH","whm"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/","url":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/","name":"Reset File and Folder Permissions and Ownership for a user account in Cpanel","isPartOf":{"@id":"https:\/\/hoganhost.com.ng\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel.jpg","datePublished":"2024-01-19T00:35:15+00:00","dateModified":"2024-08-12T12:22:20+00:00","description":"Use this script to reset the permissions and ownership of files and folders on a Cpanel user account. This script will iterate through a","breadcrumb":{"@id":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#primaryimage","url":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel.jpg","contentUrl":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2024\/01\/Reset-File-and-Folder-Permissions-and-Ownership-for-a-user-account-in-Cpanel.jpg","width":1080,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/hoganhost.com.ng\/blog\/server\/ssh\/reset-file-and-folder-permissions-and-ownership-for-a-user-account-in-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hoganhost.com.ng\/blog\/"},{"@type":"ListItem","position":2,"name":"Reset File and Folder Permissions and Ownership for a user account in Cpanel"}]},{"@type":"WebSite","@id":"https:\/\/hoganhost.com.ng\/blog\/#website","url":"https:\/\/hoganhost.com.ng\/blog\/","name":"HoganHost blog","description":"Keeping you connected to everything from HoganHost","publisher":{"@id":"https:\/\/hoganhost.com.ng\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hoganhost.com.ng\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hoganhost.com.ng\/blog\/#organization","name":"HoganHost","url":"https:\/\/hoganhost.com.ng\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2022\/09\/hogan-host.png","contentUrl":"https:\/\/hoganhost.com.ng\/blog\/wp-content\/uploads\/2022\/09\/hogan-host.png","width":466,"height":387,"caption":"HoganHost"},"image":{"@id":"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/HoganHost","https:\/\/x.com\/hoganhostng","https:\/\/instagram.com\/officialhoganhost"]},{"@type":"Person","@id":"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/af16a18c6cc966b92a6cb13b500f3f0a","name":"Abigal okon","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hoganhost.com.ng\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ef2272070d016c06ee69b30adce7c4e4b4faaa5c899c4b9224a5b1a43b1fb8d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef2272070d016c06ee69b30adce7c4e4b4faaa5c899c4b9224a5b1a43b1fb8d0?s=96&d=mm&r=g","caption":"Abigal okon"},"sameAs":["https:\/\/hoganhost.com.ng\/blog"],"url":"https:\/\/hoganhost.com.ng\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/posts\/1965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/comments?post=1965"}],"version-history":[{"count":7,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/posts\/1965\/revisions"}],"predecessor-version":[{"id":1973,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/posts\/1965\/revisions\/1973"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/media\/1967"}],"wp:attachment":[{"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/media?parent=1965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/categories?post=1965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hoganhost.com.ng\/blog\/wp-json\/wp\/v2\/tags?post=1965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}