Transmission-daemon:无法编辑 settings.json

Transmission-daemon:无法编辑 settings.json

我想编辑位于的 Transmission-daemon 的主配置文件,/etc/transmission-daemon/settings.json但由于其默认权限,我无法这样做:

/etc/transmission-daemon$ ls -lah
total 16K
drwxrwsr-x   2 root                debian-transmission 4.0K Mar 19 12:28 .
drwxr-xr-x 103 root                root                4.0K Mar 19 12:28 ..
-rw-r--r--   1 root                root                 303 Dec 19  2021 README.json
-rw-------   1 debian-transmission debian-transmission 2.4K Mar 19 12:28 settings.json

我是 Transmission 的新手,因此,假设用户应该编辑 settings.json,允许编辑的最安全方法是什么?

环境:

  • Ubuntu 22.04.2 LTS
  • 传输守护进程 3.00 (bb6b5a062e)

感谢您的帮助。

答案1

`settings.json` is owned by the `debian-transmission` user and group, you should just use sudo to grant you the full rights, for example if you want to open the file with a text editor like `nano` do `sudo nano /etc/transmission-daemon/settings.json`

修改文件后,重新启动transmission即可sudo systemctl restart transmission-daemon

相关内容