簡單的問題:我有一個用戶在我的系統上稱爲「用戶」。此用戶具有sudo權限。爲什麼我不能瀏覽到sudoer.d目錄呢?不能更改爲sudoers.d目錄
是因爲cd是內置命令嗎?
[[email protected] etc]$ ls -al | grep sudoers.d
drwxr-x---. 2 root root 4096 Apr 4 18:09 sudoers.d
[[email protected] etc]$ sudo cd sudoers.d
[[email protected] etc]$ pwd
/etc
[[email protected] etc]$ sudo ls -la sudoers.d/
total 12
drwxr-x---. 2 root root 4096 Apr 4 18:09 .
drwxr-xr-x. 79 root root 4096 May 5 05:20 ..
-r--r-----. 1 root root 33 Apr 4 18:09 vagrant
[[email protected] etc]$ sudo vim sudoers.d/vagrant
[[email protected] etc]$
非常感謝。
你需要'+ x'權限'cd'到一個目錄... – anishsane
'須藤cd'是毫無意義的。 'cd'是shell內建的。 'sudo'是一個外部命令。 – anishsane
當您嘗試sudo cd時,您應該會收到錯誤,因爲它是內置的... – 123