There's nothing special about changing to a hidden folder. You change to a hidden folder using the method you described in your question. The folder in your question isn't hidden... the problem is that you don't have access to change to that folder, because you don't own it, and it's only available to the owner.
Details of what has caused the problem
You're having problems because you have run the sudo
elevated command in your personal space (or some GUI application that stores configurations in your personal space). You can avoid this common problem by only running sudo
to elevate a comment when you are trying to do something or install something to affect the system-wide behavior... not to as a normal routine while using your computer.
The files in your personal space should be owned by you. The example in your question shows the directory (which happens to be in your personal space) is not owned by you. It's owned by root.
You can check and verify which files and directories have this problem by running this command:
$ find ~/ -mount ! -user $(whoami)
You can take charge of the files in your personal space with this command:
$ sudo chown -R $(whoami):$(whoami) ~/
There is no reason for your personal files to be owned by anyone else but you. If you want to provide files and directories you can use the /opt
area to place these files and folders.
You can directly affect the immediate folder you are having problems with by using sudo
to change the owner to you, without checking all the other files and folders in your personal.
Direct and immediate resolution
You can use this command to directly fix the immediate problem described:
$ sudo chown $(whoami) ~/.docker
root
and has no permission for others to access (execute / read) – steeldriver May 25 '18 at 22:46/bin/ls -ld /home/djj375/.docker
– waltinator May 25 '18 at 22:48