Skip to content

Commit 8504d0a

Browse files
rishabh9Misty Stanley-Jones
authored andcommitted
Fix linux-postinstall.md (docker#5327)
1 parent 8896e88 commit 8504d0a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

engine/installation/linux/linux-postinstall.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,26 @@ To create the `docker` group and add your user:
5555
This command downloads a test image and runs it in a container. When the
5656
container runs, it prints an informational message and exits.
5757

58+
If you initially ran Docker CLI commands using `sudo` before adding
59+
your user to the `docker` group, you may see the following error,
60+
which indicates that your `~/.docker/` directory was created with
61+
incorrect permissions due to the `sudo` commands.
62+
63+
```none
64+
WARNING: Error loading config file: /home/user/.docker/config.json -
65+
stat /home/user/.docker/config.json: permission denied
66+
```
67+
68+
To fix this problem, either remove the `~/.docker/` directory
69+
(it will be recreated automatically, but any custom settings
70+
will be lost), or change its ownership and pemissions using the
71+
following commands:
72+
73+
```bash
74+
$ sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
75+
$ sudo chmod g+rwx "/home/$USER/.docker" -R
76+
```
77+
5878
## Configure Docker to start on boot
5979

6080
Most current Linux distributions (RHEL, CentOS, Fedora, Ubuntu 16.04 and higher)

0 commit comments

Comments
 (0)