I have been using Linux for two years, but today I encountered a very strange thing. I have nginx deployed on one server, and this is its log folder:
♪ log l -d nginx
drwx------ 2 nginx nginx 4.0K Dec 7 03:15 nginx
(I'm using zsh and ♪ log
means I am in a folder named 'log'. As you can see, I ended up saying that I did not go into the folder named 'nginx'.)
When I try to access it:
♪ log cd nginx
cd: permission denied: nginx
♪ log sudo cd nginx
♪ log
Even after I changed its permissions to 766, this folder still can not be accessed:
♪ log sudo chmod -R 766 nginx
♪ log l -d nginx
drwxrw-rw- 2 nginx nginx 4.0K Dec 7 03:15 nginx
♪ log cd nginx
cd: permission denied: nginx
♪ log sudo cd nginx
♪ log
Can someone explain this to me?
root
bysudo -i
and then try to docd
? – kirill-a Dec 07 '17 at 07:42