Welcome! Log In Create A New Profile

Advanced

Unable to access transmission web interface: 403 forbidden

Posted by saz 
saz
Unable to access transmission web interface: 403 forbidden
January 28, 2012 12:48AM
Hi,

First of all I am very new to Linux/Debian, but with the help of a friend installed debian squeeze on my dockstar and was using tranmission 2.03. It was working fine for last few months but lately I am facing problem in accessing transmission web interface (http://192.168.1.3:9091/transmission/web/) as I am getting the following error:

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.


After I googled, I found there is some issue with settings.json. But I am unable to fix this issue. Can some one help me on how to get this fixed? Apologies if this has already been answered or its too noobish, actually i am too noob when it comes to Linux/Debian.

Thanks!
Re: Unable to access transmission web interface: 403 forbidden
January 28, 2012 11:10AM
1. Stop transmission
2. Edit /etc/transmission-daemon/settings.json and set user/pass, change the whitelist accordingly or disable it etc and save the file.
3. Start Transmission
saz
Re: Unable to access transmission web interface: 403 forbidden
January 28, 2012 12:37PM
Thanks, actually settings.json was missing from /etc/transmission-daemon/ location, so I copied it to the location. Now even though I am able to access the transmission via web interface but I am still unable to download any torrents. As when I start downloading anything the download starts and then automatically stops within a few seconds. I guess there is some problem in Download dir location in settings.json. Currently it is set to /root/downloads...any pointers on how to fix this?
saz
Re: Unable to access transmission web interface: 403 forbidden
January 29, 2012 09:54AM
After some hit and trial I was successfully able to start download for one torrent, but when I try to add another torrent and download, it doesn't start at all. I found that the settings.json file is present at three locations:

1. /root/.config/transmission-daemon/settings.json
2. /etc/transmission-daemon/settings.json
3. /var/lib/transmission-daemon/info/settings.json

Also, earlier when I was able to download the torrents all those torrents could be found under /var/lib/transmission-daemon/info/torrents location. So I am not sure in which of the 3 above mentioned locations I have to update the 'download-dir' and what should be my download location?
Re: Unable to access transmission web interface: 403 forbidden
January 29, 2012 10:15AM
How do you start transmission? Do you execute an script in /etc/init.d?
If you just type "transmission-daemon" from a terminal, you will end up with settings.json at the location you start the program from.
saz
Re: Unable to access transmission web interface: 403 forbidden
January 29, 2012 10:59AM
yes, there is a script under /etc/init.d that runs which is something like this:

#!/bin/sh -e
### BEGIN INIT INFO
# Provides: transmission-daemon
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start or stop the transmission-daemon.
### END INIT INFO

NAME=transmission-daemon
DAEMON=/usr/bin/$NAME
USER=debian-transmission
# FIXME: no pidfile support; forks, so --make-pidfile doesn't work either
#PIDFILE=/var/run/$NAME.pid
STOP_TIMEOUT=3

export PATH="${PATH:+$PATH:}/sbin"

[ -x $DAEMON ] || exit 0

[ -e /etc/default/$NAME ] && . /etc/default/$NAME

. /lib/lsb/init-functions

start_daemon () {
if [ $ENABLE_DAEMON != 1 ]; then
log_progress_msg "(disabled, see /etc/default/${NAME})"
else
start-stop-daemon --start \
--chuid $USER \
--exec $DAEMON -- $OPTIONS
fi
}

case "$1" in
start)
log_daemon_msg "Starting bittorrent daemon" "$NAME"
start_daemon
log_end_msg 0
;;
stop)
log_daemon_msg "Stopping bittorrent daemon" "$NAME"
start-stop-daemon --stop --quiet \
--exec $DAEMON --retry $STOP_TIMEOUT \
--oknodo
log_end_msg 0
;;
reload)
log_daemon_msg "Reloading bittorrent daemon" "$NAME"
start-stop-daemon --stop --quiet \
--exec $DAEMON \
--oknodo --signal 1
log_end_msg 0
;;
restart|force-reload)
log_daemon_msg "Restarting bittorrent daemon" "$NAME"
start-stop-daemon --stop --quiet \
--exec $DAEMON --retry $STOP_TIMEOUT \
--oknodo
start_daemon
log_end_msg 0
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart}"
exit 2
;;
esac

exit 0
Re: Unable to access transmission web interface: 403 forbidden
January 29, 2012 11:33AM
The one from transmissionbt.com has the following part...
#
# ----- CONFIGURATION -----
#
# For the default location Transmission uses, visit:
# http://trac.transmissionbt.com/wiki/ConfigFiles
# For a guide on how set the preferences, visit:
# http://trac.transmissionbt.com/wiki/EditConfigFiles
# For the available environement variables, visit:
# http://trac.transmissionbt.com/wiki/EnvironmentVariables
#
# The name of the user that should run Transmission.
# It's RECOMENDED to run Transmission in it's own user,
# by default, this is set to 'transmission'.
# For the sake of security you shouldn't set a password
# on this user
USERNAME=transmission
toward the beginning of the script. By setting USERNAME to transmission, the settings will be under /home/transmission/.config/transmission-daemon .



Edited 1 time(s). Last edit at 01/29/2012 11:35AM by funtoy1001.
saz
Re: Unable to access transmission web interface: 403 forbidden
January 29, 2012 12:11PM
In my case the script mentioned above looks for /etc/default/$NAME. Where $NAME is set to "transmission-daemon" and when I open this file it has:


# defaults for transmission-daemon
# sourced by /etc/init.d/transmission-daemon

# Change to 0 to disable daemon
ENABLE_DAEMON=1

# This directory stores some runtime information, like torrent files
# and links to the config file, which itself can be found in
# /etc/transmission-daemon/settings.json
CONFIG_DIR="/var/lib/transmission-daemon/info"

# Default options for daemon, see transmission-daemon(1) for more options
OPTIONS="--config-dir $CONFIG_DIR"



which gives me idea that settings.json at /var/lib/transmission-daemon/info location is being used. But problem is when I set 'Download-dir' to be /mnt/Downloads....the download doesnt start :(



Edited 1 time(s). Last edit at 01/29/2012 12:13PM by saz.
saz
Re: Unable to access transmission web interface: 403 forbidden
January 30, 2012 11:27AM
can some one help me here, Now I am able to seed the already downloaded torrents but still unable to download new :(
Below is my settings.json file:

{
"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": "/mnt/Downloads",
"encryption": 1,
"incomplete-dir": "/mnt/Downloads",
"incomplete-dir-enabled": false,
"lazy-bitfield-enabled": true,
"lpd-enabled": false,
"message-level": 2,
"open-file-limit": 32,
"peer-limit-global": 240,
"peer-limit-per-torrent": 0,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 1024,
"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": false,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "{6160f9e5864307e57828803438bf1c64da360c87KPcL6HEx",
"rpc-port": 9091,
"rpc-username": "",
"rpc-whitelist": "127.0.0.1,192.168.*.*",
"rpc-whitelist-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"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-slots-per-torrent": 14
}
Re: Unable to access transmission web interface: 403 forbidden
January 30, 2012 12:12PM
Did you do a df to see if /mnt/Downloads has space for the new torrents?
saz
Re: Unable to access transmission web interface: 403 forbidden
January 31, 2012 12:57AM
I will try that in the evening, but I guess HDD has ample space. Could this be because of some write permission issue?



~~~~~~~~Edit~~~~~~~~~~
well somehow I managed to make it work, by using chmod command to set permissions for /mnt/Downloads directory and other transmission directories. But would want to make sure its stable and doesn't throw any error....for time being its up and running fine :)



Edited 1 time(s). Last edit at 01/31/2012 09:21AM by saz.
saz Wrote:
-------------------------------------------------------
> Hi,
>
> First of all I am very new to Linux/Debian, but
> with the help of a friend installed debian squeeze
> on my dockstar and was using tranmission 2.03. It
> was working fine for last few months but lately I
> am facing problem in accessing transmission web
> interface
> (http://192.168.1.3:9091/transmission/web/) as I
> am getting the following error:
>
> 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.

>
> After I googled, I found there is some issue with
> settings.json. But I am unable to fix this issue.
> Can some one help me on how to get this fixed?
> Apologies if this has already been answered or its
> too noobish, actually i am too noob when it comes
> to Linux/Debian.
>
> Thanks!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: