1

i'm running a headless media server off of a raspberry pi in my home, but i am presently unable to write anything onto it via qbittorrent (using the qbittorrent-nox package to run via webui) after getting it to work without needing a terminal constantly running it by using a service created via this guide. when using qbittorrent in a terminal accompanied by sudo, it is able to write to the drive, but with several attempts at trying to change permissions of the mounted folder using chmod and chown, i have been unsuccessful. is there a way i could either:

  1. make the service run as root

or

  1. make the mounted folder writeable by everyone (previously used chmod ugo+rwx and similar, with no dice)

any and all help is appreciated

2
  • Unfortunately, the guide doesn’t tell us where you’re trying to save those files. Please provide that path. Please also provide the exact chmod and chown command lines (including the path) you tried, as well as the output of mount.
    – Daniel B
    Commented Feb 25, 2023 at 22:00
  • @DanielB i believed i used chmod ugo+rwx media (when in root, trying to modify the folder /media where my drive was mounted using the command sudo mount -t exfat /dev/sdb1 /media, and now as i look into the command history, never successfully executed a chown command, only attempts such as chown ugo+rwx media. Commented Feb 26, 2023 at 1:51

1 Answer 1

0

Neither chown nor chmod is expected to work on exfat or other Windows filesystems.

You should probably add:

-o uid=qbittorrent,gid=qbittorrent

to the mount command to change the ownerships. (I don't think the position matters at all but right after mount or right before /dev/sdb1 are definitely fine.)

If you want to access the directories / files in the mount with your "main user" (e.g. pi) without resorting to sudo or alike, you might need to add appropriate permission mask mount options to the command as well to change the (group) permissions (and have the user added to the qbittorrent group as your linked guide instructed).


To run the torrent program as root, you just need to remove the User= and Group= lines in the service, but as the guide mentioned, you don't want to do that because of security reasons.

3
  • i found something similar earlier and added umask=000 which i believe solves the same thing as you put here, except with even more freedom towards all users as i read. Commented Feb 26, 2023 at 6:22
  • Yeah that's essentially the same thing as "ugo+rwx", I think.
    – Tom Yan
    Commented Feb 26, 2023 at 6:30
  • 1
    before i tried to do 777, as i thought that was what allowed total freedom, but instead i suppose it meant total restriction, as not only could i not write to the drive, i could not enter the mount folder either. Commented Feb 26, 2023 at 6:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .