为什么一个命令有效而另一个命令无效\xe2\x80\x99t?我找到了一些远程相关的文章,但我无法理解它们。
\n$ sudo ls -la /tmp/restricted\ntotal 12\ndrwxr-x---. 2 root root 42 Mar 17 17:40 .\ndrwxrwxrwt. 12 root root 12288 Mar 17 17:37 ..\n-rwxrwxr-x. 1 root tms 0 Mar 17 17:22 foo1\n-rwxrwxr-x. 1 root tms 0 Mar 17 17:22 foo2\n-rwxrwxr-x. 1 root tms 0 Mar 17 17:22 foo3\n\n$ sudo ls -a /tmp/restricted/foo*\nls: cannot access /tmp/restricted/foo*: No such file or directory\n
Run Code Online (Sandbox Code Playgroud)\n请注意,如果我将 /tmp/restricted 上的权限更改为 755 而不是 750,则两个命令都会成功:
\n$ sudo chmod 755 /tmp/restricted/\n\n$ sudo ls -la /tmp/restricted\ntotal 12\ndrwxr-xr-x. 2 root …
Run Code Online (Sandbox Code Playgroud)