我在運行此代碼時遇到此錯誤。
gpg --fingerprint
GPG:警告:在 配置文件不安全所有權 `/home/dylan/.gnupg/gpg.conf
這個問題似乎是與權限,但我已盡力這個代碼,它似乎沒有改變一件事情。通過鸚鵡螺檢查,我擁有該文件並具有讀取/寫入權限,並且所有其他設置爲「無」。
sudo chmod 600 ~/.gnupg/gpg.conf
[email protected]:~$ sudo chown -R dylan ~dylan/.gnupg
[sudo] password for dylan:
[email protected]:~$ chmod 600 ~/.gnupg/gpg.conf
[email protected]:~$ chmod 700 ~/.gnupg
[email protected]:~$ gpg --fingerprint
[email protected]:~$ sudo gpg --fingerprint
gpg: WARNING: unsafe ownership on configuration file `/home/dylan/.gnupg/gpg.conf'
[email protected]:~$ ls -al /home/dylan/.gnupg
total 24
drwx------ 2 dylan dylan 4096 2010-02-02 13:46 .
drwxr-xr-x 60 dylan dylan 4096 2010-02-02 13:43 ..
-rw------- 1 dylan dylan 9364 2010-01-27 06:34 gpg.conf
-rw------- 1 dylan dylan 0 2010-01-27 06:34 pubring.gpg
-rw------- 1 dylan dylan 0 2010-01-27 06:34 secring.gpg
-rw------- 1 dylan dylan 40 2010-01-27 06:34 trustdb.gpg
[email protected]:~$
@Nona:正如我之前所說的,sudo(8)命令以'root'(系統管理員)身份執行命令。當你是root的時候,你可以做任何事情,你用chmod(1)改變的權限不涉及'root'。這就是爲什麼你從gpg(1)得到警告。 'dylan @ Majuscule:〜$ gpg --fingerprint'它應該做什麼? – emil 2010-02-03 08:04:33