Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Correctly" setup a daemon permissions
#1

Hello everybody! I've got a little question here: how do I correctly set up a daemon and its related folders permissions?

 

I've got a little server going here which, among other thing, I'd like to use as a torrent box. My home server drive has a "storage" partition which I share on the LAN via AFP (so I can use it as external storage for my macbook). The administrator user of my server is the owner of this partition.

 

What I would like to achieve is a torrent daemon auto-picking torrent files from a folder on "storage" (say /mnt/storage/torrents) and downloading them into a "downloads" folder (say /mnt/storage/downloads). I've downloaded deluge and sort of have set it up. 

 

Now, it might seem stupid but what confuses me is: how am I supposed to "correctly" configure the permissions on the folders? Right now everybody has access to the "torrents" and "downloads" folders (chmod 777), I am the owner of those folders and deluge is running under debian-deluge:debian-deluge. I've read a bunch of guides and tutorials online (some say I should join the debian-deluge group and set the permissions for the group, some say that I should make deluge run with my user's privileges and so on) but I eventually got pretty confused and ended up here. Is there anybody so kind to help this linux noob out? :)

Reply
#2

I don't exactly quite get what you are saying extacly. But I'll try to answer from what I do get. As far as I can remember deluge has a setting where you can select that it auto scans a certain folder for torrents that it then downloads torrents that are in there. Under option-.folders you can select: move completed to, auto add torrents from, download to. If you setup auto add torrents folder to /mnt/storage/torrents, then download folder for example /mnt/storage,downloads/incomplete, and the move completed: /mnt/storage/downloads/completed Is that kinda what you are trying to do?

 

As for the permission thing, it just depends on how you want your setup. I'm taking you have deluge running as a daemon, if it's only for you you can just leave it to run as you and set the permissions just for you and let the daemon run as your user. What you could do also if you are planning to share stuff with friends. You could setup a new user, exampe deluge, make deluge run as that user, setup a folder structure some how like I said above, you could then add a group, any name(ie: torrentz), give the directory structure of where deluge downloads torrents 770. Then add yourself and any other user needing access to the deluge location.

 

as root:

adduser username create a new user

addgroup groupname create new group

usermod -a -G group user add a user to the group

 

 

Hope that helps?

Reply
#3

Quote:I don't exactly quite get what you are saying extacly. But I'll try to answer from what I do get. As far as I can remember deluge has a setting where you can select that it auto scans a certain folder for torrents that it then downloads torrents that are in there. Under option-.folders you can select: move completed to, auto add torrents from, download to. If you setup auto add torrents folder to /mnt/storage/torrents, then download folder for example /mnt/storage,downloads/incomplete, and the move completed: /mnt/storage/downloads/completed Is that kinda what you are trying to do?
First of all, sorry for being confusing, my english isn't perfect :)I actually have figured this part out but thank you anyway! :)

 

Quote:As for the permission thing, it just depends on how you want your setup. I'm taking you have deluge running as a daemon, if it's only for you you can just leave it to run as you and set the permissions just for you and let the daemon run as your user. What you could do also if you are planning to share stuff with friends. You could setup a new user, exampe deluge, make deluge run as that user, setup a folder structure some how like I said above, you could then add a group, any name(ie: torrentz), give the directory structure of where deluge downloads torrents 770. Then add yourself and any other user needing access to the deluge location.

 

as root:

adduser username create a new user

addgroup groupname create new group

usermod -a -G group user add a user to the group

 

 

Hope that helps?
Yeah, this actually helped! I actually didn't think of just making my user account join the deluge group. This also "automatically" has fixed all the permissions troubles I had! Thank you :)

Reply
#4
Glad you got it sorted out :)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)