0

Here's what I'm looking to do. I want samba shares that I can read,write, and execute on. If I put a file there on one computer, I want to be able to delete or edit it from another. I also want to run a deluge Daemon that will put files into the directories shared by samba, and minidlna streaming to xbox.

I've tried this a couple times, and ran into many problems. My problems are with owners and permissions. First, I minidlna couldn't access things placed by Deluge because it was denied permission, So I messed around with chmod and chown, and then I couldn't delete things I'd placed in samba shares. Soon everything I tried to do ended in "Permission Denied". I'm going to start all over.

I understand how to install deluge and samba, and how to edit conf files. My questions are, should I use one user for samba sharing, running deluge daemon, and minidlna? Should this user or users have a password? What should the directory and file permissions be in smb.conf? What options should I have in fstab when I mount the partitions I'm sharing? If there's multiple users for these services, should they all be in a group?

The guides I have read for deluge on an ubuntu server had me create a user "deluge" with no password that would run the daemon. The guides on samba had me use the user I created on installation. There was no info on using them together.

ajb746
  • 183

1 Answers1

1

You can have the Deluge, samba and any other users involved part of a common group (say smbshare):

sudo addgroup smbshare
sudo adduser deluge smbshare
sudo adduser smb smbshare

Then change the group of the shared folder to smbshare:

sudo chgrp smbshare /path/to/shared/folder

Then assign group write privileges and make the folder setgid, so that anything created in it retain group ownership.

sudo chmod g+sw /path/to/shared/folder

Have a look at this question to see an example of a multi-user read/write setup: How to force group ownership on samba share? In particular note the mask values set:

create mask     = 0775
directory mask  = 0775

They allow group write for newly created files.

muru
  • 197,895
  • 55
  • 485
  • 740