我在运行此代码时遇到此错误。
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