[SOLVED] 403: Forbidden!!!!!!

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
carharot
Posts: 13
Joined: Wed Sep 26, 2012 2:14 pm

Re: [SOLVED] 403: Forbidden!!!!!!

Post by carharot »

having heavy war with that torrent client about ~5 hours.

FreeBSD 9.0

internal network face was opened for any connections.

whitelist settings and othe one reread and rechecked about ~ 50 times. All're made as in instruction.

watching only that messages in messages log file:
Sep 26 18:15:04 estaf transmission-daemon[79085]: UDP Failed to set receive buffer: No buffer space available (tr-udp.c:58)
Sep 26 18:15:04 estaf transmission-daemon[79085]: UDP Failed to set receive buffer: requested 4194304, got 42080 (tr-udp.c:77)

Bat that moment I decided with sysctl kern.ipc.maxsockbuf=10485760 one. anyway - it's not solve problem with authorization.

Client of transmission-daemon is 4.03 version for mac.

daemon version: 2.61 (13407)

on web interface:
"403: Forbidden

Unauthorized IP Address.

Either disable the IP address whitelist or add your address to it.

If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.

If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details."

ifconfig on the client side:
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=2b<RXCSUM,TXCSUM,VLAN_HWTAGGING,TSO4>
ether .........
inet6 .........en0 prefixlen 64 scopeid 0x4
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
media: autoselect (1000baseT <full-duplex,flow-control>)
status: active

Code: Select all

cat /usr/local/etc/transmission/settings.json
{
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "dht-enabled": true,
    "download-dir": "\/usr\/home\/iron\/1\/downloads",
    "encryption": 1,
    "incomplete-dir": "\/usr\/home\/iron\/1\/downloads\/incomplete",
    "incomplete-dir-enabled": true,
    "lazy-bitfield-enabled": true,
    "message-level": 2,
    "open-file-limit": 32,
    "peer-limit-global": 240,
    "peer-limit-per-torrent": 60,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": 0,
    "pex-enabled": true,
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "proxy": "",
    "proxy-auth-enabled": false,
    "proxy-auth-password": "",
    "proxy-auth-username": "",
    "proxy-enabled": false,
    "proxy-port": 80,
    "proxy-type": 0,
    "ratio-limit": 2.0000,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": true,
    "rpc-bind-address": "192.168.1.1",
    "rpc-enabled": true,
    "rpc-port": 9091,
    "rpc-username": "iron",
    "rpc-password": "111",
    "rpc-whitelist": "192.168.1.2",
    "rpc-whitelist-enabled": true,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "umask": 18,
    "upload-slots-per-torrent": 14
}
sockstat | grep 9091
iron transmissi 79336 7 tcp4 *:9091 *:*

pf.conf

Code: Select all

cat /etc/pf.conf 
ext_if="tun0"
ext_local="rl0"
int_if="nfe0"
icmp_types="{ echoreq, unreach}"
trusted_lan="{ 192.168.1.0/24, 192.168.2.0/24 }"
untrusted_lan="10.0.0.0/8"
vpn_net="192.168.11.0/24"
table <vpn_net> { 192.168.11.0/24 }
vpn_if="{ ng0, ng1, ng2, ng3, ng4, ng5, ng6, ng7, ng8, ng9, ng10, ng11, ng12, ng13, ng14, ng15, ng16, ng17, ng18, ng19, ng19, ng20, ng21, ng22 }"
localnet="127.0.0.0/8"
tcp_services="{ 20, 21, 1723, 5901 }"
udp_services="{ 5901, 1723 }"
vpn_ports="{ 3389, 20165 }"
set block-policy return
set skip on lo0
set skip on $int_if
scrub in all
nat on $ext_if from $trusted_lan to any -> ($ext_if)
nat on $ext_local  from $trusted_lan to any -> ($ext_local)
antispoof quick for ($ext_if)
antispoof quick for ($ext_local)
block log all
pass out on $ext_if from ($ext_if) to any
pass out on $ext_if from $trusted_lan to any
pass out on $ext_local from ($ext_local) to any
pass out on $ext_local from $trusted_lan to any
pass log inet proto icmp all icmp-type $icmp_types
# pptp
pass in on $ext_if proto tcp from any to ($ext_if) port $tcp_services flags S/SA
pass in on vpn_if proto tcp from <vpn_net> to <vpn_net> port $vpn_ports
pass out on vpn_if proto tcp from <vpn_net> to <vpn_net> port $vpn_ports
#pass in on ng0 proto { tcp, udp } from any to <vpn_net> port $vpn_ports
#pass in on ng1 proto { tcp, udp } from any to <vpn_net> port $vpn_ports
I normally go to web (Apache), ftp etc services on the that BSD from mac, and have problems with that transmission daemon.

Чем его бороть, этот суперпупер даемон, блин)))
carharot
Posts: 13
Joined: Wed Sep 26, 2012 2:14 pm

Re: [SOLVED] 403: Forbidden!!!!!!

Post by carharot »

solved
in /etc/rc.conf
...
transmission_user="iron"
transmission_conf_dir="/usr/home/iron/.config/transmission"
transmission_flags="--log-error --logfile=/usr/home/iron/.config/transmission.log"

iron is user.
dobler
Posts: 1
Joined: Tue Mar 03, 2015 4:38 am

Re: [SOLVED] 403: Forbidden!!!!!!

Post by dobler »

This will definetly save someone alot of time. I'm about 6 hours into this. On a default ubuntu 14 install the program will be loading its settings file from /var/lib/transmission-daemon/info/ NOT /etc/transmission-daemon like every one says. I edited the file there. Problem solved.

I don't know why no one else posted about this or why I couldn't find this answer anywhere else on the internet. I followed every single tutorial I could find and no one ever mentioned this.
p01ntsurf3r
Posts: 1
Joined: Wed Mar 18, 2015 3:50 am

Re: [SOLVED] 403: Forbidden!!!!!!

Post by p01ntsurf3r »

I would like to add to this thread if anyone still uses it. I ran into this problem and could not for the life of me figure out why all the suggestions failed. I recently installed debian jessie RC1 on my server, and with it there was a few changes. The main change as it pertained to getting the transmission daemon to run was this: the root user home directory is now /root instead of /
I'm not sure if this is how it should have been on all older versions, but it wasn't for me. My setup probably isn't the safest being ran as root, but i don't care, this is pretty much just a daemon box. After scouring the net i foudn this page

https://trac.transmissionbt.com/wiki/ConfigFiles
where it explicitly states:"For the Daemon, all settings are kept in $HOME/.config/transmission-daemon"

Bam problem solved, all the other locations i was using "/etc/transmission-daemon/settings.json" or the "/var/lib/..." locations weren't working because the settings.json file i was interested was stored in the $HOME/.config/transmission-daemon directory. I hope this information is useful to the next person that has this issue...find your home directory for the user running your daemon and look there.
holalalo
Posts: 1
Joined: Wed May 13, 2015 7:34 am

Re: [SOLVED] 403: Forbidden!!!!!!

Post by holalalo »

dobler wrote:This will definetly save someone alot of time. I'm about 6 hours into this. On a default ubuntu 14 install the program will be loading its settings file from /var/lib/transmission-daemon/info/ NOT /etc/transmission-daemon like every one says. I edited the file there. Problem solved.

I don't know why no one else posted about this or why I couldn't find this answer anywhere else on the internet. I followed every single tutorial I could find and no one ever mentioned this.
Ok I created an account to say this.

THANK YOU! I hav been confused for hours why I couldn't get it to work while editing the settings.json in /etc/transmission-daemon. Once i edited /var/lib/transmission-daemon/info it worked like a charm!

Thanks!

Edit: Im also using ubuntu 14.04.
Cyroq
Posts: 1
Joined: Mon Nov 16, 2015 8:42 am

Re: [SOLVED] 403: Forbidden!!!!!!

Post by Cyroq »

I know it's an old thread, but since I have the exact same problem I won't bother anyone with opening a new one.
It seems that the solution lies in de location of settings.json. However, I can only find these locations on my Jessie distro:
/etc/transmission-daemon/settings.json
/home/pi/.config/transmission-daemon/settings.json

The folder /var/lib/transmission-daemon does not exist in my system. What am I missing here?

Just in case, this is my settings.json file:

Code: Select all

{
    "alt-speed-down": 20,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 10,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 4,
    "dht-enabled": true,
    "download-dir": "/media/netshare/Downloads/",
    "download-limit": 100,
    "download-limit-enabled": 0,
    "download-queue-enabled": true,
    "download-queue-size": 8,
    "encryption": 1,
    "idle-seeding-limit": 30,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "/media/netshare/Downloads/incomplete",
    "incomplete-dir-enabled": false,
    "lpd-enabled": false,
    "max-peers-global": 200,
    "message-level": 1,
    "peer-congestion-algorithm": "",
    "peer-id-ttl-hours": 6,
    "peer-limit-global": 200,
    "peer-limit-per-torrent": 50,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "port-forwarding-enabled": false,
    "preallocation": 1,
    "prefetch-enabled": 1,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": .5,
    "ratio-limit-enabled": true,
    "rename-partial-files": true,
    "rpc-authentication-required": true,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "{d7ccf8a61314022359f440e5119ab567cedfd6cevsZlZni7",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "transmission",
    "rpc-whitelist": "*.*.*.*",
    "rpc-whitelist-enabled": false,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": true,
    "script-torrent-done-filename": "/etc/transmission-daemon/xbmc-upd.sh",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 1000,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 20,
    "speed-limit-up-enabled": true,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 18,
    "upload-limit": 100,
    "upload-limit-enabled": 0,
    "upload-slots-per-torrent": 14,
    "utp-enabled": true
}
leopheard
Posts: 6
Joined: Tue May 30, 2017 3:05 am

Re: [SOLVED] 403: Forbidden!!!!!!

Post by leopheard »

I have been having this problem for a good few hours now, after being denied on the basis of this topic title after the GUI had been running fine for weeks.

I THINK I've solved it through doing one of the following:

Making sure the username is set in the correct line under the settings file under one of the following locations, as well as 'rpc-enabled', etc etc:
/home/pi/.config/transmission-daemon
/var/lib/transmission-daemon/info/
/etc/transmission-daemon/
/etc/default/transmission-daemon/
/etc/init.d/transmission-daemon/
/etc/init.d/rc (apparently there's a setting for some in there on some Linux distros that helps)

But what I think finally sorted it out was creating the separate Transmission user as per this guide (and rebooting the Raspberry Pi instead of restarting the daemon):
https://trac.transmissionbt.com/wiki/Scripts/initd

It's recommended to run Transmission in it's own user. By default, the script is configured to 'transmission'. For the sake of security you shouldn't set a password on this user. Try:

Code: Select all

$ adduser --disabled-password transmission
However, you can also set the USERNAME to any user you prefer.[/i]

I then had to allow this new user on the Raspberry Pi to be able to edit the contents of the download folder as there were permission errors at first. It was too fiddly to allow the user explicitly as I'd have to have mad a group etc. so I just changed the folder to allow anyone to read/write:

Code: Select all

sudo chmod -R a+rwx targetfolder
I didn't need to change any folders e.g. torrent auto load folder or incomplete as they were inside my target/torrent folder.
Nostalgia
Posts: 5
Joined: Tue Jun 13, 2017 7:11 pm

Re: [SOLVED] 403: Forbidden!!!!!!

Post by Nostalgia »

Hello Friends,

I have the same issue and have this 403: Forbidden error. And boy I litteraly spent all night trying to fix it up and read countless thread on this issue :shock: . Please help, would really appreciate it. If someone could check out my transmission config files below.

I upgraded my server, upgraded transmission. Always stopped Transmission before Editing the json config file.

Note : I have three location where I have a setting.json file and where I tried to put the same config file. And nothing happened always this error page ...

/etc/transmission-daemon
/root/.config/transmission-daemon
/var/lib/transmission-daemon/.config/transmission-daemon (In this one i have some kind of folder link)

Here is my actual settings.json :

Code: Select all

{
    "alt-speed-down": 50, 
    "alt-speed-enabled": false, 
    "alt-speed-time-begin": 540, 
    "alt-speed-time-day": 127, 
    "alt-speed-time-enabled": false, 
    "alt-speed-time-end": 1020, 
    "alt-speed-up": 50, 
    "bind-address-ipv4": "0.0.0.0", 
    "bind-address-ipv6": "::", 
    "blocklist-enabled": false, 
    "blocklist-url": "http://www.example.com/blocklist", 
    "cache-size-mb": 4, 
    "dht-enabled": true, 
    "download-dir": "/home/downloader", 
    "download-limit": 100, 
    "download-limit-enabled": 0, 
    "download-queue-enabled": true, 
    "download-queue-size": 5, 
    "encryption": 1, 
    "idle-seeding-limit": 30, 
    "idle-seeding-limit-enabled": false, 
    "incomplete-dir": "/home/downloader/incomplete", 
    "incomplete-dir-enabled": false, 
    "lpd-enabled": false, 
    "max-peers-global": 200, 
    "message-level": 2, 
    "peer-congestion-algorithm": "", 
    "peer-id-ttl-hours": 6, 
    "peer-limit-global": 500, 
    "peer-limit-per-torrent": 1000, 
    "peer-port": 51413, 
    "peer-port-random-high": 65535, 
    "peer-port-random-low": 49152, 
    "peer-port-random-on-start": false, 
    "peer-socket-tos": "default", 
    "pex-enabled": true, 
    "port-forwarding-enabled": false, 
    "preallocation": 1, 
    "prefetch-enabled": 1, 
    "queue-stalled-enabled": true, 
    "queue-stalled-minutes": 30, 
    "ratio-limit": 2.0000, 
    "ratio-limit-enabled": false, 
    "rename-partial-files": true, 
    "rpc-authentication-required": false, 
    "rpc-bind-address": "0.0.0.0", 
    "rpc-enabled": true, 
    "rpc-password": "*****",  
    "rpc-port": 9091, 
    "rpc-url": "/transmission/", 
    "rpc-username": "***", 
    "rpc-whitelist": "***.**.***.***", 
    "rpc-whitelist-enabled": false, 
    "scrape-paused-torrents-enabled": true, 
    "script-torrent-done-enabled": false, 
    "script-torrent-done-filename": "", 
    "seed-queue-enabled": false, 
    "seed-queue-size": 10, 
    "speed-limit-down": 100, 
    "speed-limit-down-enabled": false, 
    "speed-limit-up": 100, 
    "speed-limit-up-enabled": false, 
    "start-added-torrents": true, 
    "trash-original-torrent-files": false, 
    "umask": 18, 
    "upload-limit": 100, 
    "upload-limit-enabled": 0, 
    "upload-slots-per-torrent": 14, 
    "utp-enabled": true
}
leopheard
Posts: 6
Joined: Tue May 30, 2017 3:05 am

Re: [SOLVED] 403: Forbidden!!!!!!

Post by leopheard »

Nostalgia wrote:I have the same issue and have this 403: Forbidden error.
Look at my post directly above yours, I think there might be a solution in there for you. I think it's an issue with the user account using Transmission
Nostalgia
Posts: 5
Joined: Tue Jun 13, 2017 7:11 pm

Re: [SOLVED] 403: Forbidden!!!!!!

Post by Nostalgia »

Hey Leopheard,

Thanks for your return, thought my post would end up in oblivion :p

I'm still stuck and I have absolutly no idea what to do.

Using those commands doesnt seem to work :

chmod +x /etc/init.d/transmission-daemon
chown root:root /etc/init.d/transmission-daemon

And I'm not sure I understand the first part of your message
Making sure the username is set in the correct line under the settings file under one of the following locations, as well as 'rpc-enabled', etc etc:
Oh lord ... :cry:
leopheard
Posts: 6
Joined: Tue May 30, 2017 3:05 am

Re: [SOLVED] 403: Forbidden!!!!!!

Post by leopheard »

Nostalgia wrote:And I'm not sure I understand the first part of your message
Making sure the username is set in the correct line under the settings file under one of the following locations, as well as 'rpc-enabled', etc etc:
Oh lord ... :cry:
I don't think it's a folder read/write setting issue, as the issue is you can't save to a folder or edit the files there, but simply login to the remote webview of the Transmission server right?

Could you paste what you have on these lines from your /etc/transmission-daemon/settings.json file AND any settings files you find in the folders in the ones I listed above?

"rpc-authentication-required": false,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "*****",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "***",
"rpc-whitelist": "***.**.***.***",
"rpc-whitelist-enabled": false,
Nostalgia
Posts: 5
Joined: Tue Jun 13, 2017 7:11 pm

Re: [SOLVED] 403: Forbidden!!!!!!

Post by Nostalgia »

First of all, thank you soo much for trying to help out ! Really appreciate it. :D
I don't think it's a folder read/write setting issue, as the issue is you can't save to a folder or edit the files there, but simply login to the remote webview of the Transmission server right?
> Correct, I just cant access my webview of Transmission.

> So here are the settings I have in the folders you listed and still the same error.

Note :
I dont have any "transmission-daemon" folders in the following adress you mentionned, is that normal ?

/etc/default/transmission-daemon/
/etc/init.d/transmission-daemon/
/etc/init.d/rc

Code: Select all

    "rpc-authentication-required": false,
    "rpc-bind-address": "0.0.0.0", 
    "rpc-enabled": true, 
    "rpc-password": "*****", 
    "rpc-port": 9091,
    "rpc-url": "/transmission/", 
    "rpc-username": "***", 
    "rpc-whitelist": "***.***.***.***",
    "rpc-whiteliste-enabled": false, 
leopheard
Posts: 6
Joined: Tue May 30, 2017 3:05 am

Re: [SOLVED] 403: Forbidden!!!!!!

Post by leopheard »

Nostalgia wrote:

Code: Select all

    "rpc-authentication-required": false,
    "rpc-bind-address": "0.0.0.0", 
    "rpc-enabled": true, 
    "rpc-password": "*****", 
    "rpc-port": 9091,
    "rpc-url": "/transmission/", 
    "rpc-username": "***", 
    "rpc-whitelist": "***.***.***.***",
    "rpc-whiteliste-enabled": false, 
Maybe put the rpc-bind-address to your static IP of your device you're running as a torrent server. If it's not set as a static IP, you'll need to set this.

Also, I think the RPC-username bit also needs to be set to: "transmission". You'll also need to do the following as stated on this website (https://www.htpcbeginner.com/install-tr ... untu-1204/):

Then, add the username user to the group debian-transmission:

Code: Select all

sudo usermod -a -G debian-transmission user
This will add debian-transmission as a secondary group to the account user, resulting in access to both Transmission and user. Then, change the ownership of the Transmission download folders to the group debian-transmission:

Code: Select all

sudo chgrp -R debian-transmission /home/user/Downloads/transmission
[/i]

If the above doesn't work, I suggest trying:

Code: Select all

sudo usermod -a -G debian-transmission transmission
Then reboot your machine. It's most likely a problem with trying to access transmission as the wrong username or transmission itself running under the wrong username. This is what fixed my issue
powermta
Posts: 2
Joined: Thu Sep 07, 2017 8:50 pm

Re: [SOLVED] 403: Forbidden!!!!!!

Post by powermta »

I also had the same problem, it amazes me to see that after so much time still happens
cacafuti8888
Posts: 1
Joined: Wed Sep 27, 2017 5:24 pm

Re: [SOLVED] 403: Forbidden!!!!!!

Post by cacafuti8888 »

To all of you still getting the eerror 403 in transmission web, DO NOT install the program and the daemon. Install one or another but not both. I spend 2h changing ports until i realize that changing the program ports don't change the daemon's and viceversa. Once i change the daemon port to another different than the program the problem was solved. Then i remove the daemon with the installer and all working again.
Post Reply