Setup Samba and Transmission on Ubuntu Server

taufanmft

Reputable
Apr 17, 2014
8
0
4,510
So, I have Samba and Transmission on an Ubuntu Server box. I want to place the downloaded torrents (from Transmission) in /home/Taufan/download , incomplete download in /home/Taufan/incomplete , and I want Transmission to lookup /home/Taufan/torrents to automatically download the torrents from .torrent provided in that folder

And the Samba, I would like Samba to have full control of those folder (read, write, copy, delete, etc.) And it will be nice if the guest can look into that folder (just read), but when I access it with a username, I can modify it. Can I do that?

Thanks! :)
 
Solution
For samba you need to edit /etc/samba/smbd.conf, might be easiest to add two entries one with full access and another for quests. For example add these to the end of your smbd.conf:

sudo nano -w /etc/samba/smbd.conf

[my share with write access] #This is the name of the share as it's shown in network
comment = My Torrents
path = /home/Taufan/download
valid users = yourusername
writable = yes
printable = no
create mask = 0777
unix extensions = no
follow symlinks = no #you can set this to yes if you intend to use symlinks to access other directories
wide links = yes
browseable = no #this share won't show when browsing network

[my share with quest access]
comment = My Files
path = /home/Taufan/download...

taufanmft

Reputable
Apr 17, 2014
8
0
4,510

OK, I understand the Transmission. But, the Samba, you mean right clicking the folder on WIndows?

 

stillblue

Honorable
Nov 30, 2012
1,163
0
11,660
No, you right click the folder on the server and you have local network sharing. Once you click that if samba is installed you click share folder if it's not it'll ask if you want to install it. There you find the share level of registered user or you can allow guest users as well. You as the admin/owner have full rights and if you wish to access remotely you need to use an ssh connection. I use hotssh.
 

stillblue

Honorable
Nov 30, 2012
1,163
0
11,660


You can have a gui with the server if you are so inclined. if not we have two approaches.

The command line sitting at the server. For that you should read this tutorial about it http://www.linuxcommand.org/lts0070.php
OR
If you install webmin on the server, sudo apt-get install webmin you can go to another computer on the network and have a very nice GUI in the browser that has many features for administering a server. For that you should give the server a fixed ip address.
 

Samat

Distinguished
For samba you need to edit /etc/samba/smbd.conf, might be easiest to add two entries one with full access and another for quests. For example add these to the end of your smbd.conf:

sudo nano -w /etc/samba/smbd.conf

[my share with write access] #This is the name of the share as it's shown in network
comment = My Torrents
path = /home/Taufan/download
valid users = yourusername
writable = yes
printable = no
create mask = 0777
unix extensions = no
follow symlinks = no #you can set this to yes if you intend to use symlinks to access other directories
wide links = yes
browseable = no #this share won't show when browsing network

[my share with quest access]
comment = My Files
path = /home/Taufan/download
printable = no
unix extensions = no
follow symlinks = no
# wide links = yes
guest ok = yes

After making the changes to config restart samba:

sudo service samba restart

You might need to add a smbuser, you can add one by typing:

sudo smbpasswd -a yourusername

If you use same username as you use to login to your server it will sync the password with samba.

You can edit the settings for transmission daemon by editing the settings file (always stop transmission daemon beofre editing settings or it will overwrite your changes):

sudo service transmission-daemon stop
sudo nano -w /etc/transmission-daemon/settings.json

After changes restart the service with

sudo service transmission-daemon start

You can read more about setting up transmission from this article: http://www.webupd8.org/2009/12/setting-up-transmission-remote-gui-in.html
 
Solution

Samat

Distinguished


Symbolic link is a link to a file or folder and accessing that symbolic link is like accessing the actual file or directory. In samba enabling symlinks allows symlink to follow inside the directory path set in config enabling widelinks allows symlink in samba share to link to any file/directory in the system. For example if you share /home/myuser/share and make symlink /home/myuser/share->/myfiles/somedirectoy without widelinks set samba would deny access to that directory. Type 'ln --help' in command line to get help if you want to create a symbolic link.