![更改 deluge-daemon 的下载文件夹](https://linux22.com/image/886939/%E6%9B%B4%E6%94%B9%20deluge-daemon%20%E7%9A%84%E4%B8%8B%E8%BD%BD%E6%96%87%E4%BB%B6%E5%A4%B9.png)
我正在使用 Ubuntu 16.04,并且设置了一个
/var/systemd/system/deluge-daemon.service
[Unit]
Description=Deluge Bittorrent Client Daemon
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=007
ExecStart=/usr/bin/deluged -d
Restart=on-failure
# Configures the time to wait before service is stopped forcefully.
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target
/var/systemd/system/deluge-web.service
[Unit]
Description=Deluge Bittorrent Client Web Interface
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=027
ExecStart=/usr/bin/deluge-web
Restart=on-failure
[Install]
WantedBy=multi-user.target
并且服务正常进行。
之后我设置了在启动时挂载另一个硬盘,这是我的 fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=376f4302-e8f7-4e86-ac8d-f814ed810e43 / ext4 errors=remount-ro 0 1
UUID=30916bc6-913e-44e4-979c-e158f11d9abf /media/agusgambina/30916bc6-913e-44e4-979c-e158f11d9abf ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=7d282884-f8ae-4002-b59e-a516fea1763d none swap sw 0 0
我的“第二个”磁盘是此时安装的磁盘/media/agusgambina/30916bc6-913e-44e4-979c-e158f11d9abf
然后我更改了文件夹权限。文件夹的所有者是用户 deluge,它属于组 deluge
$ chown deluge:deluge -R /media/agusgambina/30916bc6-913e-44e4-979c-e158f11d9abf/deluge
之后,我在应用程序中将下载目录更改为新文件夹。但每次我尝试开始新的下载时,都会收到权限被拒绝的错误
Permission denied: /media/agusgambina/30916bc6-913e-44e4-979c-e158f11d9abf/deluge/temp/ubuntu-16.04.1-desktop-amd64.iso
更新 1:
这是文件夹权限
drwxrwxr-x 53 deluge deluge 4096 sep 28 00:46 incoming/
drwxrwxr-x 2 deluge deluge 4096 ene 1 2016 logs/
drwxrwxr-x 2 deluge deluge 4096 jul 7 20:01 temp/
drwxrwxr-x 2 deluge deluge 4096 dic 31 2015 torrents/
更新 2:
/media/agusgambina 的权限
drwx-----x 8 agusgambina agusgambina 4096 ene 3 2016 30916bc6-913e-44e4-979c-e158f11d9abf/
答案1
您改变了所有权,但所有者是否有该目录的写权限?
做
ls -laF /media/agusgambina/30916bc6-913e-44e4-979c-e158f11d9abf/deluge/