{"id":2288,"date":"2015-07-20T14:57:29","date_gmt":"2015-07-20T14:57:29","guid":{"rendered":"http:\/\/kedar.nitty-witty.com\/?p=2288"},"modified":"2024-01-27T17:35:24","modified_gmt":"2024-01-27T17:35:24","slug":"mysql-1018-hy000-cant-read-dir-errno-13-permission-denied","status":"publish","type":"post","link":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied","title":{"rendered":"MySQL Permission denied error 13 and solution"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this post we will see the resolution of MySQL &#8220;permission denied&#8221; error due to movement of database to a different partition on CentOS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"color: #ff6600;\"> ERROR 1018 (HY000): Can&#8217;t read dir of &#8216;.\/sakila\/&#8217; (errno: 13 &#8211; Permission denied)<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Recently, a friend was stuck on following issue and he was not able to access the tables under &#8216;sakila&#8217; database. Though he was able to read all other databases!<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ERROR 1018 (HY000): Can't read dir of '.\/sakila\/' (errno: 13 - Permission denied)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is what happens when he try accessing the tables from sakila database:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt;use sakila;\nReading table information for completion of table and column names\nYou can turn off this feature to get a quicker startup with -A\n\nDatabase changed\nmysql&gt; show tables;\nERROR 1018 (HY000): Can't read dir of '.\/sakila\/' (errno: 13 - Permission denied)\n<\/pre>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">We reviewed the &#8216;sakila&#8217; database, it was well owned by mysql user and group with proper permissions.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@localhost mysql]# ls -lrth | grep sakila\nlrwxrwxrwx. 1 mysql mysql   15 Jul  6 07:51 sakila -&gt; \/database\/sakila\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note that &#8220;sakila&#8221; is pointing (\/soft-linked) to a different partition which was the recent change he made! We confirmed that the partition and sakila database \/ datafiles were again having correct permissions too.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Usually such error is <span style=\"text-decoration: underline;\">caused by wrong permission<\/span> due to which MySQL isn&#8217;t able to read the specifics. Correcting the file\/folder permissions can fix them quickly!<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$] chown mysql:mysql \/database -R  # Making sure \/database and everything under is mysql owned.\n$] chown mysql:mysql \/var\/lib\/mysql -R # Making sure mysql $] datadir and everything under is mysql owned.\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We can actually connect as mysql user and confirm that the table files are readable by mysql!<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@localhost mysql]# su - mysql\n[mysql@localhost ~] cd \/var\/lib\/mysql\/sakila\n[mysql@localhost sakila]# cat actor.frm\n...\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Though ours was not the permission issue and without softlink it was working fine!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Solution to the Permission Denied Error<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Considering, all but sakila database&nbsp; tables were generating &#8220;permission denied&#8221; errors and mysql error log remained silent about this, we&#8217;re surely dealing with some &#8220;external&#8221; power!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We are on CentOS and we have something called <strong>SELinux<\/strong>!<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><em>Security-Enhanced Linux (SELinux) is a Linux kernel security module that provides a mechanism for supporting access control security policies, including ... mandatory access controls (MAC).<\/em>\n- Wikipedia\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">SELinux logs at <strong>\/var\/log\/audit\/audit.log<\/strong> and following is a snippet from audit log:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">type=AVC msg=audit(1436192732.305:119): avc:  <span style=\"color: #ff0000;\"><strong>denied  { read } for  pid=7063 comm=\"mysqld\" name=\"sakila\"<\/strong><\/span> dev=sda3 ino=655362 scontext=unconfined_u:system_r:mysqld_t:s0 tcontext=unconfined_u:object_r:default_t:s0 tclass=dir\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This confirms that SELinux is obstructing MySQL to read from location other than datadir and fixing that will make MySQL happy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Command <b>&#8216;sestatus&#8217;<\/b> can show the SELinux Status:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@localhost mysql]# sestatus\nSELinux status:                 enabled\nSELinuxfs mount:                \/selinux\nCurrent mode:                   enforcing\nMode from config file:          <span style=\"color: #ff0000;\"><strong>enforcing<\/strong><\/span>\nPolicy version:                 24\nPolicy from config file:        targeted\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here we can note SELinux is enabled and the mode is enforcing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here comes 2 more commands: <b>setenforce &amp; getenforce.<\/b><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The &#8220;setenforce 0&#8221; command switches off SELinux enforcing, and getenforce shows you the current status. Though setenforce is a &#8220;temporary&#8221; solution and it will auto-reset to configuration option upon system reboot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To make it persistent over reboots, we&#8217;ll need to change a configuration file, \/etc\/sysconfig\/selinux:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@localhost mysql]# cat \/etc\/sysconfig\/selinux\n# This file controls the state of SELinux on the system.\n# SELINUX= can take one of these three values:\n#     enforcing - SELinux security policy is enforced.\n#     permissive - SELinux prints warnings instead of enforcing.\n#     disabled - No SELinux policy is loaded.\n<span style=\"color: #99cc00;\">#SELINUX=enforcing # Removed this line to disable SELinux completely.\nSELINUX=disabled<\/span>\n# SELINUXTYPE= can take one of these two values:\n#     targeted - Targeted processes are protected,\n#     mls - Multi Level Security protection.\nSELINUXTYPE=targeted\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We added &#8220;SELINUX=disabled&#8221; to <span style=\"text-decoration: underline;\">disable SELinux completely<\/span>. (You might want to keep it &#8220;<span style=\"text-decoration: underline;\">permissive<\/span>&#8221; or even better, manage SELinux policies.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Upon disabling SELinux the issue went away and &#8216;sakila&#8217; database&nbsp; tables were accessible.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; use sakila\nReading table information for completion of table and column names\nYou can turn off this feature to get a quicker startup with -A\n\nDatabase changed\nmysql&gt; show tables;\n+----------------------------+\n| Tables_in_sakila           |\n+----------------------------+\n| actor                      |\n| actor_info                 |\n| address                    |\n| category                   |\n| city                       |\n| country                    |\n| customer                   |\n| customer_list              |\n| film                       |\n| film_actor                 |\n| film_category              |\n| film_list                  |\n| film_text                  |\n| inventory                  |\n| language                   |\n| nicer_but_slower_film_list |\n| payment                    |\n| rental                     |\n| sales_by_film_category     |\n| sales_by_store             |\n| staff                      |\n| staff_list                 |\n| store                      |\n+----------------------------+\n23 rows in set (0.00 sec)\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Just to note that <strong>\/etc\/sysconfig\/selinux<\/strong> configuration file for SELinux is actually pointing to \/etc\/selinux\/config.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@localhost mysql]# ls -l \/etc\/sysconfig\/selinux\nlrwxrwxrwx. 1 root root 17 Oct  8  2014 \/etc\/sysconfig\/selinux -&gt; ..\/selinux\/config\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Later I found plenty of posts just talking about the same issue! So we walked a common path, but not without learning!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On CentOS, Redhat or Fedora we have SELinux while on Ubuntu, Debian or SuSE you should find AppArmor! Refer a good post from Jeremy @Oracle <a href=\"https:\/\/blogs.oracle.com\/jsmyth\/entry\/selinux_and_mysql\" target=\"_blank\" rel=\"nofollow noopener\">here.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hope this helps (or refreshes).<\/p>\n","protected":false},"excerpt":{"rendered":"MySQL ERROR 1018 (HY000): Can&#8217;t read dir of &#8216;.\/sakila\/&#8217; (errno: 13 &#8211; Permission denied) caused due to moving database to a different partition and using softlink on CentOS and it&#8217;s fix for SELinux.\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[8,377],"tags":[872,873,874,871,533],"class_list":["post-2288","post","type-post","status-publish","format-standard","category-mysql","category-mysql-articles","tag-errno-13-permission-denied","tag-fix-mysql-permission-denied-error","tag-mysql-and-selinux","tag-mysql-permission-denied","tag-selinux"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"How to fix MySQL ERROR 1018 (HY000): Can&#039;t read dir of &#039;.\/sakila\/&#039; (errno: 13 - Permission denied) on CentOS and its relation with SELinux\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Kedar\"\/>\n\t<meta name=\"google-site-verification\" content=\"_Bu1h5r0PxIC0D2jBVdmYN45RTeG9ogcX85XLkbG1qA\" \/>\n\t<meta name=\"msvalidate.01\" content=\"116B62074CBCA1BA99B8CCE09CCF2FB8\" \/>\n\t<meta name=\"keywords\" content=\"mysql,permission denied,1018,selinux,mysql and selinux,disable selinux,can\\&#039;t read dir,errno 13,errno: 13 - permission denied,fix mysql permission denied error,mysql permission denied\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Change Is Inevitable | Kedar Vaijanapurkar&#039;s Blog for MySQL, technology and various subjects\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"MySQL 1018 (HY000): Can&#039;t read dir errno: 13 - Permission denied | Change Is Inevitable\" \/>\n\t\t<meta property=\"og:description\" content=\"How to fix MySQL ERROR 1018 (HY000): Can&#039;t read dir of &#039;.\/sakila\/&#039; (errno: 13 - Permission denied) on CentOS and its relation with SELinux\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2015-07-20T14:57:29+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-01-27T17:35:24+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"MySQL 1018 (HY000): Can&#039;t read dir errno: 13 - Permission denied | Change Is Inevitable\" \/>\n\t\t<meta name=\"twitter:description\" content=\"How to fix MySQL ERROR 1018 (HY000): Can&#039;t read dir of &#039;.\/sakila\/&#039; (errno: 13 - Permission denied) on CentOS and its relation with SELinux\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#article\",\"name\":\"MySQL 1018 (HY000): Can't read dir errno: 13 - Permission denied | Change Is Inevitable\",\"headline\":\"MySQL Permission denied error 13 and solution\",\"author\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"},\"datePublished\":\"2015-07-20T14:57:29+00:00\",\"dateModified\":\"2024-01-27T17:35:24+00:00\",\"inLanguage\":\"en-US\",\"commentCount\":3,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#webpage\"},\"articleSection\":\"MySQL, MySQL-Articles, errno: 13 - Permission denied, fix MySQL Permission Denied Error, MySQL and SELinux, mysql permission denied, selinux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"name\":\"MySQL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"position\":2,\"name\":\"MySQL\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles#listItem\",\"name\":\"MySQL-Articles\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles#listItem\",\"position\":3,\"name\":\"MySQL-Articles\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#listItem\",\"name\":\"MySQL Permission denied error 13 and solution\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"name\":\"MySQL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#listItem\",\"position\":4,\"name\":\"MySQL Permission denied error 13 and solution\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles#listItem\",\"name\":\"MySQL-Articles\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\",\"name\":\"Kedar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin\",\"name\":\"Kedar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#webpage\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied\",\"name\":\"MySQL 1018 (HY000): Can't read dir errno: 13 - Permission denied | Change Is Inevitable\",\"description\":\"How to fix MySQL ERROR 1018 (HY000): Can't read dir of '.\\\/sakila\\\/' (errno: 13 - Permission denied) on CentOS and its relation with SELinux\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"datePublished\":\"2015-07-20T14:57:29+00:00\",\"dateModified\":\"2024-01-27T17:35:24+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/\",\"name\":\"..::CHANGE is INEVITABLE::..\",\"description\":\"Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"MySQL 1018 (HY000): Can't read dir errno: 13 - Permission denied | Change Is Inevitable","description":"How to fix MySQL ERROR 1018 (HY000): Can't read dir of '.\/sakila\/' (errno: 13 - Permission denied) on CentOS and its relation with SELinux","canonical_url":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied","robots":"max-image-preview:large","keywords":"mysql,permission denied,1018,selinux,mysql and selinux,disable selinux,can\\'t read dir,errno 13,errno: 13 - permission denied,fix mysql permission denied error,mysql permission denied","webmasterTools":{"google-site-verification":"_Bu1h5r0PxIC0D2jBVdmYN45RTeG9ogcX85XLkbG1qA","msvalidate.01":"116B62074CBCA1BA99B8CCE09CCF2FB8","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#article","name":"MySQL 1018 (HY000): Can't read dir errno: 13 - Permission denied | Change Is Inevitable","headline":"MySQL Permission denied error 13 and solution","author":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"publisher":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"},"datePublished":"2015-07-20T14:57:29+00:00","dateModified":"2024-01-27T17:35:24+00:00","inLanguage":"en-US","commentCount":3,"mainEntityOfPage":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#webpage"},"isPartOf":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#webpage"},"articleSection":"MySQL, MySQL-Articles, errno: 13 - Permission denied, fix MySQL Permission Denied Error, MySQL and SELinux, mysql permission denied, selinux"},{"@type":"BreadcrumbList","@id":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/kedar.nitty-witty.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","name":"MySQL"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","position":2,"name":"MySQL","item":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles#listItem","name":"MySQL-Articles"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles#listItem","position":3,"name":"MySQL-Articles","item":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#listItem","name":"MySQL Permission denied error 13 and solution"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","name":"MySQL"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#listItem","position":4,"name":"MySQL Permission denied error 13 and solution","previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles#listItem","name":"MySQL-Articles"}}]},{"@type":"Person","@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person","name":"Kedar","image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"}},{"@type":"Person","@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author","url":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin","name":"Kedar","image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"}},{"@type":"WebPage","@id":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#webpage","url":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied","name":"MySQL 1018 (HY000): Can't read dir errno: 13 - Permission denied | Change Is Inevitable","description":"How to fix MySQL ERROR 1018 (HY000): Can't read dir of '.\/sakila\/' (errno: 13 - Permission denied) on CentOS and its relation with SELinux","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied#breadcrumblist"},"author":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"creator":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"datePublished":"2015-07-20T14:57:29+00:00","dateModified":"2024-01-27T17:35:24+00:00"},{"@type":"WebSite","@id":"https:\/\/kedar.nitty-witty.com\/blog\/#website","url":"https:\/\/kedar.nitty-witty.com\/blog\/","name":"..::CHANGE is INEVITABLE::..","description":"Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects","inLanguage":"en-US","publisher":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Change Is Inevitable | Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects","og:type":"article","og:title":"MySQL 1018 (HY000): Can't read dir errno: 13 - Permission denied | Change Is Inevitable","og:description":"How to fix MySQL ERROR 1018 (HY000): Can't read dir of '.\/sakila\/' (errno: 13 - Permission denied) on CentOS and its relation with SELinux","og:url":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied","article:published_time":"2015-07-20T14:57:29+00:00","article:modified_time":"2024-01-27T17:35:24+00:00","twitter:card":"summary","twitter:title":"MySQL 1018 (HY000): Can't read dir errno: 13 - Permission denied | Change Is Inevitable","twitter:description":"How to fix MySQL ERROR 1018 (HY000): Can't read dir of '.\/sakila\/' (errno: 13 - Permission denied) on CentOS and its relation with SELinux"},"aioseo_meta_data":{"post_id":"2288","title":"MySQL 1018 (HY000): Can't read dir errno: 13 - Permission denied | #site_title","description":"How to fix MySQL ERROR 1018 (HY000): Can't read dir of '.\/sakila\/' (errno: 13 - Permission denied) on CentOS and its relation with SELinux","keywords":[{"label":"MySQL","value":"MySQL"},{"label":"permission denied","value":"permission denied"},{"label":"1018","value":"1018"},{"label":"selinux","value":"selinux"},{"label":"MySQL and SELinux","value":"MySQL and SELinux"},{"label":"disable selinux","value":"disable selinux"},{"label":"Can't read dir","value":"Can't read dir"},{"label":"errno 13","value":"errno 13"}],"keyphrases":{"focus":{"keyphrase":"Permission denied","score":90,"analysis":{"keyphraseInTitle":{"score":9,"maxScore":9,"error":0},"keyphraseInDescription":{"score":9,"maxScore":9,"error":0},"keyphraseLength":{"score":9,"maxScore":9,"error":0,"length":2},"keyphraseInURL":{"score":5,"maxScore":5,"error":0},"keyphraseInIntroduction":{"score":9,"maxScore":9,"error":0},"keyphraseInSubHeadings":{"score":3,"maxScore":9,"error":1},"keyphraseInImageAlt":[],"keywordDensity":{"type":"best","score":9,"maxScore":9,"error":0}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-24 17:40:44","updated":"2025-08-16 19:16:14","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\" title=\"MySQL\">MySQL<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles\" title=\"MySQL-Articles\">MySQL-Articles<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMySQL Permission denied error 13 and solution\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/kedar.nitty-witty.com\/blog"},{"label":"MySQL","link":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql"},{"label":"MySQL-Articles","link":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles"},{"label":"MySQL Permission denied error 13 and solution","link":"https:\/\/kedar.nitty-witty.com\/blog\/mysql-1018-hy000-cant-read-dir-errno-13-permission-denied"}],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/2288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/comments?post=2288"}],"version-history":[{"count":6,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/2288\/revisions"}],"predecessor-version":[{"id":2865,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/2288\/revisions\/2865"}],"wp:attachment":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/media?parent=2288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/categories?post=2288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/tags?post=2288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}