ofstudio

[Solved] Disable Webui Authorization

Recommended Posts

Hi! 

Is there any way to disable WebUI auth in BTSync? I want to place webui behind proxy web app with own auth mechanism. 

 

Here is my /etc/default/btsync

# This is the configuration file for /etc/init.d/btsync# Start only these btsync instances automatically via# init script.# Allowed values are "all", "none" or space separated list of# names of the instances. If empty, "all" is assumed.## The instance name refers to the btsync configuration file name.# i.e. "general" would be /etc/btsync/general.confAUTOSTART="media"# Optional arguments to btsync's command line. Be careful!# You should only add thngs here if you know EXACTLY what# you are doing!DAEMON_ARGS=""

and my /etc/btsync/media.conf

// DAEMON_UID=media// DAEMON_GID=media// DAEMON_UMASK=0002{        "device_name": "RaspberryPi-Ninja",        "storage_path" : "/media/NinjaStorage/BTSync/.btsync",        "listening_port" : 0,        "check_for_updates" : false,        "use_upnp" : false,        "download_limit" : 0,        "upload_limit" : 0,        "disk_low_priority" : true,        "lan_encrypt_data" : false,        "lan_use_tcp" : false,        "rate_limit_local_peers" : false,        "folder_rescan_interval" : 600,        "webui" :        {                "listen" : "192.168.1.32:32888"         }}

…but all the browsers trying to ask for login and password. :unsure:

Share this post


Link to post
Share on other sites

The DAEMON variables should not be in the config file for btsync (unless it is on purpose for the Linux package). Secondly, you can see if btsync is running with the config file with ps on the command line. It should be btsync --config /etc/btsync/media.conf.

Share this post


Link to post
Share on other sites

Yes, btsync running with right config file

pi@RPi2-Ninja ~ $  ps -ef | grep btsyncmedia     9617     1 20 08:17 ?        00:06:50 /usr/lib/btsync/btsync-daemon --nodaemon --log file --config /etc/btsync/media.conf

 

Share this post


Link to post
Share on other sites

1. Yes, config file is readable. I can set various "login" and "password" values, I can specify different port number for webiu – and everything works fine (webui works correctly with the specified login, password and port values). The only wrong case when i remove "login" and "password" lines from config.

 

2. Removal  the // DAEMON entries lead to the fact that btsync will operate as root. And new synced files will be with root:root permissions and write protected from other components of my workflow (and this is not what I want)

Share this post


Link to post
Share on other sites

1. So it works, sorry that it does not seem to work without login and password field. I use btsync for many months and have it running without authentication on my LAN, but then I just run it from the commandline.

 

2. Ok, that is specific to the Debian/ubuntu package I think and is the anticipated behaviour. I suggested this because I was not sure if those lines would be comments for btsync as well. 

 

I might have to point you to the thread by the package owner http://forum.bittorrent.com/topic/19560-debian-and-ubuntu-desktop-packages-for-bittorrent-sync/

Share this post


Link to post
Share on other sites

I'm having same issue.

First i ran without login details, the webinterface did not ask for it.

Then i added the login details to the config file and the webinterface did start asking for them.

Now i removed the login details again from the config file and the webinterface still asks for them.

 

I'll also ask this question to the debian package maintainer

Share this post


Link to post
Share on other sites

Ok, I think i've found solution. It seems like a bug.

 

The solution is simple (thnx to knireis' report)

 

1. Stop btsync

sudo service btsync stop

2. In btsync config file find "storage_path". In my case

"storage_path" : "/srv/BTSync/users/media/.btsync",

3. Navigate to storage_path. Backup two files: settings.dat and settings.dat.old to somewhere (just to be on the safe side) and then delete them from storage_path directory.

 

4. In your btsync config file remove "login" and "password" lines.

 

5. Start btsync again:

sudo service btsync start

 

Share this post


Link to post
Share on other sites

I'm having same issue.

First i ran without login details, the webinterface did not ask for it.

Then i added the login details to the config file and the webinterface did start asking for them.

Now i removed the login details again from the config file and the webinterface still asks for them.

 

I'll also ask this question to the debian package maintainer

Try this solution:

1. Remove password from web ui

2. Shutdown btsync

3. Comment lines in config:

/* "login" : "user",

    "password" : "pass"
*/
4.Run bstync with config.

Share this post


Link to post
Share on other sites

It doesn't work for me. There is no option to remove password from the web ui in either 1.1.82 or 1.2.82 linux x86 running on a Qnap NAS.  I am not able to remove the password from either version. I've tried setting the fields to empty values  ("login" : "") and removing the fields entirely. I noticed that the contents of the "webui" element in the JSON conf file cannot end with a trailing comma.  If you comment the "login" and "password" lines, make sure there is no trailing comma after the preceding "listen" element. (All this should be better documented.) In any case, it doesn't work. It is not possible to remove the web ui password so this looks like a bug.

 

Deleting settings.dat files is a non-starter because it would delete the configuration of the existing sync folders.

 

Also, it would be good to know where the configuration values are stored in Windows.

Edited by blsz

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.