docker-squid icon indicating copy to clipboard operation
docker-squid copied to clipboard

chcon -Rt svirt_sandbox_file_t /srv/docker/bind error

Open sameersbn opened this issue 7 years ago • 2 comments

Getting this error when I try to run this command on all the mounted files: chcon: can't apply partial context to unlabeled file 'rndc.conf'

I have also tried with sudo

chcon -Rt svirt_sandbox_file_t /srv/docker/bind

sameersbn avatar Mar 15 '18 16:03 sameersbn

➤ Slyke commented:

Here's my docker version and info:

slyke@vpshost:/srv/docker$ sudo docker version Client: Version: 1.11.2 API version: 1.23 Go version: go1.5.4 Git commit: b9f10c9 Built: Wed Jun 1 22:00:43 2016 OS/Arch: linux/amd64

Server: Version: 1.11.2 API version: 1.23 Go version: go1.5.4 Git commit: b9f10c9 Built: Wed Jun 1 22:00:43 2016 OS/Arch: linux/amd64 slyke@vpshost:/srv/docker$ sudo docker info Containers: 10 Running: 2 Paused: 0 Stopped: 8 Images: 3 Server Version: 1.11.2 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 42 Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: host bridge null Kernel Version: 4.4.0-81-generic Operating System: Ubuntu 16.04.2 LTS OSType: linux Architecture: x86_64 CPUs: 2 Total Memory: 7.611 GiB Name: vps158484 ID: 26XI:IDLI:T4JG:7DJE:4L3S:FLMD:KWVN:RROC:7RF2:EPXD:7BYI:PKWO Docker Root Dir: /var/lib/docker Debug mode (client): false Debug mode (server): false Registry: https://index.docker.io/v1/ WARNING: No swap limit supportHere's me trying the command with a fresh install of the OS:

slyke@vpshost:/srv/docker$ ls -ahl total 20K drwxrwx--- 5 root sudo 4.0K Nov 27 18:33 . drwxr-xr-x 5 root sudo 4.0K Nov 27 14:26 .. drwxr-xr-x 2 root sudo 4.0K Nov 27 18:33 bind slyke@vpshost:/srv/docker$ sudo setenforce 0 setenforce: SELinux is disabled slyke@vpshost:/srv/docker$ sudo chcon -Rt svirt_sandbox_file_t /srv/docker/bind chcon: can't apply partial context to unlabeled file '/srv/docker/bind'

sameersbn avatar Mar 15 '18 16:03 sameersbn

➤ Sourav singha commented:

Getting the same error man, Here's my docker version and info:

user001@ubuntu003:/srv/docker$ sudo docker version Client: Version: 17.12.0-ce API version: 1.35 Go version: go1.9.2 Git commit: c97c6d6 Built: Wed Dec 27 20:10:36 2017 OS/Arch: linux/amd64

Server: Engine: Version: 17.12.0-ce API version: 1.35 (minimum version 1.12) Go version: go1.9.2 Git commit: c97c6d6 Built: Wed Dec 27 20:09:12 2017 OS/Arch: linux/amd64 Experimental: falseuser001@ubuntu003:/srv/docker$ sudo docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 2 Server Version: 17.12.0-ce Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 12 Dirperm1 Supported: false Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 89623f28b87a6004d4b785663257362d1658a729 runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f init version: 949e6fa Security Options: apparmor Kernel Version: 3.13.0-24-generic Operating System: Ubuntu 14.04.5 LTS OSType: linux Architecture: x86_64 CPUs: 1 Total Memory: 1.955GiB Name: ubuntu003 ID: 7M3F:4DDT:7VJK:PMFO:VIVM:MC7F:MFYZ:6XL3:74ZW:GTMJ:XSKC:BE2H Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false

WARNING: No swap limit support WARNING: No kernel memory limit supportWhen I tried the same command got the same error:

user001@ubuntu003:/srv/docker$ ls -lah total 12K drwxr-xr-x 3 root sudo 4.0K Jan 26 20:39 . drwxr-xr-x 3 root sudo 4.0K Jan 26 20:39 .. drwxr-xr-x 2 root sudo 4.0K Jan 26 20:39 binduser001@ubuntu003:/srv/docker$ sudo chcon -Rt svirt_sandbox_file_t /srv/docker/bind chcon: can't apply partial context to unlabeled file ‘/srv/docker/bind’

sameersbn avatar Mar 15 '18 16:03 sameersbn