# Deluge cannot download to Samba CIFS share

**URL:** https://dietpi.com/forum/t/deluge-cannot-download-to-samba-cifs-share/3355
**Category:** Troubleshooting
**Created:** [22 July 2019 13:59 UTC](https://dietpi.com/forum/t/deluge-cannot-download-to-samba-cifs-share/3355 "2019-07-22T13:59:53Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![peepsnet](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/p/8e8cbc/32.png) [@peepsnet](https://dietpi.com/forum/u/peepsnet)
#### Post date: [22 July 2019 13:59 UTC](https://dietpi.com/forum/t/deluge-cannot-download-to-samba-cifs-share/3355/1 "2019-07-22T13:59:53Z")

</div>

I installed dietpi and added deluge and motioneye…

I then added samba mounts through the UI

I am not able to download to the Samba shares.

If I change the download folder to the /mnt/dietpi\_userdata/downloads then it works fine!

![](https://i.imgur.com/MQjiolv.png)

It is also not working to record movies in motioneye to the SAMBAs

Thanks,  
Don

---

<div class="post-metadata">

### Author: ![peepsnet](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/p/8e8cbc/32.png) [@peepsnet](https://dietpi.com/forum/u/peepsnet)
#### Post date: [22 July 2019 15:19 UTC](https://dietpi.com/forum/t/deluge-cannot-download-to-samba-cifs-share/3355/2 "2019-07-22T15:19:54Z")

</div>

I have a temp solution…

I went into the fstab file and changed:

file\_mode=0770,dir\_mode=0770

to

file\_mode=0777,dir\_mode=0777

then ran

```nohighlight
mount -a

```

as a temp solution!

---

<div class="post-metadata">

### Author: ![johnvick](https://dietpi.com/forum/user_avatar/dietpi.com/johnvick/32/16_2.png) [@johnvick](https://dietpi.com/forum/u/johnvick)
#### Post date: [22 July 2019 19:11 UTC](https://dietpi.com/forum/t/deluge-cannot-download-to-samba-cifs-share/3355/3 "2019-07-22T19:11:29Z")

</div>

Sounds like the user Deluge is running under does not have permission to write to the Samba share in question.

Edit the samba config file and give the relavent user access to the share. Restart the samba service.

---

<div class="post-metadata">

### Author: ![peepsnet](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/p/8e8cbc/32.png) [@peepsnet](https://dietpi.com/forum/u/peepsnet)
#### Post date: [22 July 2019 22:04 UTC](https://dietpi.com/forum/t/deluge-cannot-download-to-samba-cifs-share/3355/4 "2019-07-22T22:04:56Z")

</div>

> [@](#):
>
> Sounds like the user Deluge is running under does not have permission to write to the Samba share in question.
> 
> Edit the samba config file and give the relavent user access to the share. Restart the samba service.

Can you give an example.

My share is at 192.168.1.10/Torrents  
My DietPi has mounted the share at /mnt/NasTorrents

So what should I look for in the smb.conf?

---

<div class="post-metadata">

### Author: ![johnvick](https://dietpi.com/forum/user_avatar/dietpi.com/johnvick/32/16_2.png) [@johnvick](https://dietpi.com/forum/u/johnvick)
#### Post date: [23 July 2019 09:27 UTC](https://dietpi.com/forum/t/deluge-cannot-download-to-samba-cifs-share/3355/5 "2019-07-23T09:27:32Z")

</div>

Here’s a segment of my conf:

[global]  
client min protocol = SMB3

workgroup = WORKGROUP  
server string = %h server  
dns proxy = no  
log file = /var/log/samba/log.%m  
max log size = 1000  
syslog only = no  
syslog = 0

panic action = /usr/share/samba/panic-action %d

security = user  
encrypt passwords = true  
passdb backend = tdbsam  
obey pam restrictions = yes  
unix password sync = yes

passwd program = /usr/bin/passwd %u  
passwd chat = _Enter\snew\s_\spassword:\* %n\n _Retype\snew\s_\spassword:\* %n\n _password\supdated\ssuccessfully_ .  
pam password change = yes  
map to guest = bad user

load printers = no  
use sendfile = yes

hosts allow = 192.168.1.0/24

# SO\_RCVBUF=8192 SO\_SNDBUF=8192

# socket options = TCP\_NODELAY

# usershare allow guests = yes

[HD]  
comment = HD  
path = /mnt/usb\_2  
browseable = yes  
read only = no  
create mask = 0775  
directory mask = 0775  
valid users = root  
guest ok = no  
writeable = yes  
public = yes

Edit the path to suit. Make sure you have assigned a password to the user concerned and add the name to the valid user list.

# smbpasswd -a username

---

<div class="post-metadata">

### Author: ![aftensleuk](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/73ab20/32.png) [@aftensleuk](https://dietpi.com/forum/u/aftensleuk)
#### Post date: [23 July 2019 18:39 UTC](https://dietpi.com/forum/t/deluge-cannot-download-to-samba-cifs-share/3355/6 "2019-07-23T18:39:51Z")

</div>

I did a dirty trick… you could do the same.

On the host (the one that has the USB-disk plugged in) I would do this:

chmod -R 777 /mnt/usb\_2/ \*

This will give permissions to every user to write to the samba share. Assuming you’re on a private network with a router firewall you’ll be fine.
