docker redis 报错:find: ‘.‘: Permission denied chown: changing ownership of ‘.‘: Permission denied

解决办法:

方法/步骤

  1. 步骤一:在Docker容器创建完成后,使用docker ps -a看到容器是exit退出状态,docker start启动还是会退出

    docker容器启动报错Permission denied

  2. 步骤二:使用 docker logs 868ea1c61f4a(容器Id)查看退出容器的日志,出现报错chown: changing ownership of '/var/lib/mysql/mysql/db.frm': Permission denied

    docker redis 报错:find: ‘.‘: Permission denied chown: changing ownership of ‘.‘: Permission denied_第1张图片

  3. 步骤三:经定位需要关闭selinux,使用如下命令关闭

    临时关闭

    [root@localhost ~]# getenforce

     

    Enforcing

     

     

    [root@localhost ~]# setenforce 0

     

    [root@localhost ~]# getenforce

     

    Permissive

     

    永久关闭:

    [root@localhost ~]# vim /etc/sysconfig/selinux

     

     

    SELINUX=enforcing 改为 SELINUX=disabled

    docker redis 报错:find: ‘.‘: Permission denied chown: changing ownership of ‘.‘: Permission denied_第2张图片

  4. 步骤四:再次启动退出的容器,容器已经正常

    docker容器启动报错Permission denied

    END

原文:https://jingyan.baidu.com/article/9c69d48f7821b853c9024ef8.html 

你可能感兴趣的:(docker redis 报错:find: ‘.‘: Permission denied chown: changing ownership of ‘.‘: Permission denied)