tuxpoldo Posted September 3, 2013 Author Report Share Posted September 3, 2013 I installed BTSync described in this thread. After installation, the config-wizard opened and I did same settings, which resulted in /etc/btsync/debconf-default.conf.I did access the WebGui at port 8888 and added some directories. But where these directories-settings are saved?In /etc/btsync/debconf-default.conf is no entry about them. There is also not another config file in that folder.Also if I am not a btsync developer, I will try to give you some answer based on my observations:btsync stores a lot of runtime and configuration related stuff in an internal databased located in the storage directory. The configuration file is only a method to permit the user to override the internal defaults used when starting btsync for the first time. As you can see, you have the possibility to set many of the values defined in the configuration file also in the UI (like the listening port). I suppose that at every restart, btsync takes the values from the configuration file - if supplied. Link to comment Share on other sites More sharing options...
tuxpoldo Posted September 4, 2013 Author Report Share Posted September 4, 2013 Released new packages 1.1.70-2 with a few bugfixes and additions. All Debian builds are now online. As usual, Ubuntu builds will be probably available in a few hours.Changelog:btsync (1.1.70-2~sid) sid; urgency=low - Fixed: Restart on update will work in future versions on btsync-user (Reported and fixed by dswd) - Added multiuser support for btsync-user as suggested by user pjssilva (See http://bit.ly/13dBmOP) THIS MAY CHANGE THE PORT NUMBER FOR THE WEB UI - Fixed: Sometime btsync is still not running when the startup sequence checks if the process runs. Added sleep 1 (Suggested by raveur) -- Leo Moll <leo.moll@yeasoft.com> Wed, 04 Sep 2013 16:07:28 +0200 Link to comment Share on other sites More sharing options...
davidh2k Posted September 4, 2013 Report Share Posted September 4, 2013 Hey tuxpoldo,I see you deliver great support here. Thanks for this good and ongoing support I'm trying to get btsync to work on a debian squeeze. If I run it the "standard" way (which means running as root) it simply works, including the webinterface - i did not check if a sync works so far.But what I want to do is to run it as an unpriviliged user. But for the sake of it I cannot get it to run under another user. Alltough running as an unpriviliged user it should run with the webinterface.So I read through this thread here, especcially page 4, where someone asked something similiar. It seemed to work for him, besides the pid error he encountered...- Well, while I was writing this post I got it to run under a normal user but without webinterface - see my config below// DAEMON_UID=btsync// DAEMON_UMASK=0002//// This example will launch the instance running under the credentials// of the user "jdoe" using 0002 as umask// The internal data of the btsync daemon will be written in// /home/jdoe/.btsync// Since the web gui is disabled, the user cannot configure anything.// The instance offers one replicated directory located in// /home/jdoe/syncdir//{ "device_name": "John Doe's btsync Server", "listening_port" : 0, "storage_path" : "/home/btsync/.btsync", "check_for_updates" : false, "use_upnp" : false, "download_limit" : 0, "upload_limit" : 0, "webui" : { "listen" : "0.0.0.0:8888", "login" : "admin", "password" : "1234" }, "shared_folders" : [ { "secret" : "bGTbrwreXPW4XxHEmTKnX", "dir" : "/home/btsync/.btsync", "use_relay_server" : true, "use_dht" : false, "search_lan" : true, "use_sync_trash" : true } ]}root@openmediavault:/etc/btsync# netstat -tlpen | grep btsynctcp 0 0 0.0.0.0:40596 0.0.0.0:* LISTEN 1000 8975 7530/btsync-daemonSo the webinterface is not running, why?GreetingsDavidPS: Please don't advise me to upgrade to wheezy Link to comment Share on other sites More sharing options...
tuxpoldo Posted September 4, 2013 Author Report Share Posted September 4, 2013 I see you deliver great support here. Thanks for this good and ongoing support Thanks!But what I want to do is to run it as an unpriviliged user. But for the sake of it I cannot get it to run under another user. Alltough running as an unpriviliged user it should run with the webinterface....So the webinterface is not running, why?...PS: Please don't advise me to upgrade to wheezy Upgrading to wheezy won't be a solution ;-)OK: let's see. I have a basic squeeze test machine and I created a user btsync by issuing the command:useradd -m btsyncAnd now I create a configuration file similar to yours... The difference is, that there is no shared_folders block. Why? Because you cannot combine predefine shared folders with the web interface (it is written somewhere but I do not remember...)//!/usr/sbin/btsync-daemon --config//// DAEMON_UID=btsync// DAEMON_UMASK=0002//// This example will launch the instance running under the credentials// of the user "jdoe" using 0002 as umask// The internal data of the btsync daemon will be written in// /home/jdoe/.btsync// Since the web gui is disabled, the user cannot configure anything.// The instance offers one replicated directory located in// /home/jdoe/syncdir//{ "device_name": "John Doe's btsync Server", "listening_port" : 0, "storage_path" : "/home/btsync/.btsync", "check_for_updates" : false, "use_upnp" : false, "download_limit" : 0, "upload_limit" : 0, "webui" : { "listen" : "0.0.0.0:8888", "login" : "admin", "password" : "1234" }}Now let's launch it....service btsync restartroot@debian:/etc/btsync# lsb_release -aNo LSB modules are available.Distributor ID: DebianDescription: Debian GNU/Linux 6.0.7 (squeeze)Release: 6.0.7Codename: squeezeroot@debian:/etc/btsync# ps ax | grep btsync 1297 ? Sl 0:00 /usr/lib/btsync/btsync-daemon --nodaemon --config /etc/btsync/user-new.conf 1316 pts/0 S+ 0:00 grep btsyncroot@debian:/etc/btsync# netstat -tulpe | grep btsynctcp 0 0 *:51093 *:* LISTEN btsync 3530 1297/btsync-daemontcp 0 0 *:8888 *:* LISTEN btsync 3543 1297/btsync-daemonudp 0 0 *:3838 *:* btsync 3548 1297/btsync-daemonudp 0 0 *:51093 *:* btsync 3541 1297/btsync-daemonOK - everything working fine. Also the web interface is running. I suppose that this was your problem.One thing more: Also if it is not relevant since it was surely not your intention to predefine a shared folder AND have the web UI running, the shared folder you defined is fatally wrong: you shared the internal storage directory of btsync! This can lead to a "Larsen-Effect" and is surely not what you want... Link to comment Share on other sites More sharing options...
davidh2k Posted September 5, 2013 Report Share Posted September 5, 2013 Ah sorry, I copied together some things from the default config files.Thanks to your new config file and a reboot it works now.I apprecciate your help To the one more thing: yes, seems like I interpret that wrong.PS: Nowadays you get the advice to update to wheezy, so I say it infront, because due to using OpenMediaVault, I can't upgrade Link to comment Share on other sites More sharing options...
Nilladar Posted September 5, 2013 Report Share Posted September 5, 2013 I'm having some problems getting to the WebUI on a Ubuntu 12.04.3 headless server. It was working just fine for the longest time and now all firefox gives me is "The connection was reset." I have it set up as so:{ "device_name": "Server", "storage_path" : "/var/lib/btsync", "listening_port" : 8888, "check_for_updates" : false, "use_upnp" : true, "download_limit" : 0, "upload_limit" : 0, "disk_low_priority" : true, "lan_encrypt_data" : true, "lan_use_tcp" : true, "rate_limit_local_peers" : false, "folder_rescan_interval" : 600, "webui" : { "listen" : "0.0.0.0:8888", "login" : "server", "password" : "password" }}I'm just running it as root at the moment, I haven't set it up for normal users yet. Any help would be most appreciated. Link to comment Share on other sites More sharing options...
admiral_morketh Posted September 5, 2013 Report Share Posted September 5, 2013 That's really interesting! According to my documentation, the additional repository is added to the sources list by the Ubuntu tool add-apt-repository so I'm really wondering how it could happening that the URLs were wrong...Did you add the repository using the procedure documented in the initial post?sudo add-apt-repository ppa:tuxpoldo/btsyncyes i did i had to install python tools to be able to useadd-apt-repositorybut using the string that was posted it returned a 404 error i havent had a chance to check the repositry that i found as a power surege killed my motherboard but as far as i unerstand the way there layed out the repository gives me a 404 using the repo that was in the sources.list file that add-apt-repository installed for me Link to comment Share on other sites More sharing options...
1n5aN1aC Posted September 5, 2013 Report Share Posted September 5, 2013 Great Package and service by the way!Anyways, after painstakingly upgrading my debian squeeze to wheezy, It waid it was going to remove btsync, which I thought, fine, I'll add it back later.However, now apt-get install btsync fails claiming:The following packages have unmet dependencies:btsync : Depends: libc6 (< 2.12) but 2.13-38 is to be installedE: Unable to correct problems, you have held broken packages.Note that the held broken packages I'm pretty sure are an unrelated issue which I am working on fixing, caused by the update to wheezy. Link to comment Share on other sites More sharing options...
tuxpoldo Posted September 5, 2013 Author Report Share Posted September 5, 2013 Great Package and service by the way!...However, now apt-get install btsync fails claiming:The following packages have unmet dependencies:btsync : Depends: libc6 (< 2.12) but 2.13-38 is to be installedE: Unable to correct problems, you have held broken packages.Note that the held broken packages I'm pretty sure are an unrelated issue which I am working on fixing, caused by the update to wheezy.No problem. The solution is simple. Look into the file /etc/apt/sources.list.d/btsync.list - it should now contain the following lines:deb http://debian.yeasoft.net/btsync squeeze main contrib non-freedeb-src http://debian.yeasoft.net/btsync squeeze main contrib non-freeSimply replace squeeze with wheezy:deb http://debian.yeasoft.net/btsync wheezy main contrib non-freedeb-src http://debian.yeasoft.net/btsync wheezy main contrib non-freeAnd then update the package database and reinstall the package...sudo apt-get updatesudo apt-get install btsyncThis should solve your problem... Link to comment Share on other sites More sharing options...
tuxpoldo Posted September 5, 2013 Author Report Share Posted September 5, 2013 I'm having some problems getting to the WebUI on a Ubuntu 12.04.3 headless server. It was working just fine for the longest time and now all firefox gives me is "The connection was reset." I have it set up as so:...I'm just running it as root at the moment, I haven't set it up for normal users yet. Any help would be most appreciated.On a first look, your configuration file appears to be OK. I suppose that the problem is doe to some other cause. Please stop btsync and try a manual run in order to verify if there is some error message:# stop btsyncsudo service btsync stop# start btsync as normal process in the consolesudo /usr/lib/btsync/btsync-daemon --nodaemon --config /etc/btsync/debconf-default.confPerhaps you must change the path and name of the config file, if you are not using the debconf managed configuration file... Link to comment Share on other sites More sharing options...
1n5aN1aC Posted September 5, 2013 Report Share Posted September 5, 2013 {snip}This should solve your problem...thanks! That did it.Forgot to check the sources.list.d file, I checked pretty much everything else! Link to comment Share on other sites More sharing options...
pgrm Posted September 5, 2013 Report Share Posted September 5, 2013 Hi, great tool and works simply when running with root privileges, just it's impossible to start it in a different mode.This is my config, and as you can see, I would like it to run with www-data privileges//!/usr/lib/btsync/btsync-daemon --config//// DAEMON_UID=www-data// DAEMON_GID=www-data//// Default instance automatically created by debconf//// DO NOT EDIT THIS FILE MANUALLY//// use dpkg-reconfigure btsync to modify the// configuration////{ "device_name": "My-Server", "storage_path" : "/var/lib/btsync", "listening_port" : 0, "check_for_updates" : false, "use_upnp" : false, "download_limit" : 0, "upload_limit" : 0, "disk_low_priority" : true, "lan_encrypt_data" : true, "lan_use_tcp" : false, "rate_limit_local_peers" : false, "folder_rescan_interval" : 600, "webui" : { "listen" : "0.0.0.0:8888", "login" : "peter", "password" : "top-secret" }}when trying to start, it just doesn't start but also doesn't say anything useful in the log-file, justSep 6 01:50:22 ks36528 btsync.debconf-default: Failed to start btsync instance debconf-default - please check the configuration file /etc/btsync/debconf-default.confbut this is what I get - when running in normal mode, with the same config:root@ks36528:/etc/btsync# ps aux | grep btsyncroot 5891 0.1 0.0 124920 1788 ? Ssl 01:48 0:00 /usr/lib/btsync/btsync-daemon --config debconf-default.confroot 5947 0.0 0.0 10372 892 pts/0 S+ 01:49 0:00 grep btsynci've changed the owner of all btsync-* files in /usr and similar to www-data so I'm quite puzzled how else to solve this, any ideas?thx Link to comment Share on other sites More sharing options...
tuxpoldo Posted September 6, 2013 Author Report Share Posted September 6, 2013 Hi, great tool and works simply when running with root privileges, just it's impossible to start it in a different mode.This is my config, and as you can see, I would like it to run with www-data privileges...i've changed the owner of all btsync-* files in /usr and similar to www-data so I'm quite puzzled how else to solve this, any ideas?Believe me: it works. Beside of explaining the solution to your problem, please tell me:// Default instance automatically created by debconf//// DO NOT EDIT THIS FILE MANUALLY//// use dpkg-reconfigure btsync to modify the// configurationWhich part of "DO NOT EDIT THIS FILE MANUALLY" was not understandable? Rule Nr. 1:If you want do configure something different as debconf offers to do (and this INCLUDES also running an instance under different user credentials or have you seen in the interactive configuration the possibility to select under which credentials the default instance should run?), you MUST tell debconf that YOU DO NOT WANT A DEFAULT INSTANCE.Rule Nr. 2:If you create your manually configured instance (by writing your own configuration file), you must make sure, that btsync is able to access all its files with the needed mode. This includes:at least read access to the configuration filefull access to the storage_path directory. If this directory does not exist, the parent directory MUST exist and btsync must be able to create there the storage_path directorywrite access to the directory, where btsync wants to create its .pid-file or - if the file is already existing - write access to this file..write/full access to the directories that will be replicated by btsync (obvious)Rule Nr. 3:Never ever change ownership or mode of files installed by the btsync installer.I'm pretty sure, that your instance of btsync is not running, because /var/lib/btsync and all files contained in it are not accessible with the desired mode from the application running as www-dataBTW: all your modifications of /etc/btsync/debconf-default.conf will be overwritten at every update or automatic reconfiguration of btsync. Link to comment Share on other sites More sharing options...
knireis Posted September 7, 2013 Report Share Posted September 7, 2013 Is there a specific reason for the armel version not being in SID?Ā I run jessie on my squeezeplug and it gives an dependency error with the wheezy package. Link to comment Share on other sites More sharing options...
MerceanCoconut Posted September 7, 2013 Report Share Posted September 7, 2013 Thanks for all your work, tuxpoldo.Ā Would it be difficult to add uid/gid/umask settings to be managed by debconf? Ā The last time I checked these needed to be configured manually. Link to comment Share on other sites More sharing options...
Mektub Posted September 10, 2013 Report Share Posted September 10, 2013 Tuxpoldo,Ā Thanks for this Package and service in this forum.Ā I am trying the installation on my linux Server (Debian Wheezy)(Linux hpserver 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64 GNU/Linux)Ā In /etc/apt/sources.list.d/btsync.list I have:deb http://debian.yeasoft.net/btsync wheezy main contrib non-freedeb-src http://debian.yeasoft.net/btsync wheezy main contrib non-freeBy doing sudo apt-get install btsync I get:The following packages have unmet dependencies: btsync : Depends: libc6 (< 2.14) but 2.17-5 is to be installedE: Unable to correct problems, you have held broken packages.I am not so at easy with Debian on the server, I installed it 2 weeks ago and usually I run ArchLinux.Ā Can you give me some directions ?Ā Mektub Link to comment Share on other sites More sharing options...
tuxpoldo Posted September 12, 2013 Author Report Share Posted September 12, 2013 ...Ā I am trying the installation on my linux Server (Debian Wheezy)(Linux hpserver 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64 GNU/Linux)...By doing sudo apt-get install btsync I get:The following packages have unmet dependencies: btsync : Depends: libc6 (< 2.14) but 2.17-5 is to be installedE: Unable to correct problems, you have held broken packages....Ā Really interesting... Let me see on one of my machines:Ā tuxpoldo ~ # uname -aLinux tuxpoldo 3.2.0-4-486 #1 Debian 3.2.46-1 i586 GNU/Linuxtuxpoldo ~ # dpkg -l libc6Desired=Unknown/Install/Remove/Purge/Hold| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)||/ Name Version Architecture Description+++-=========================-=================-=================-=======================================================ii libc6:i386 2.13-38 i386 Embedded GNU C Library: Shared librariesOK. I have 2.13 installed. Can you please check, which version you have installed (dpkg -l libc6)? Please use the same commend I used. I would like to see, if your installation has anything different from usual... Link to comment Share on other sites More sharing options...
tuxpoldo Posted September 12, 2013 Author Report Share Posted September 12, 2013 Thanks for all your work, tuxpoldo.Ā Would it be difficult to add uid/gid/umask settings to be managed by debconf? Ā The last time I checked these needed to be configured manually.Ā Basically it is not really difficult. I have only to add two additional dialogue boxes in which the user can enter a username and a gid. The problem is that I have also to write a lot of code that checks that everything is entered correctly and would result in a working configuration. Since the server based btsync packages are usually intended for advanced users, I'm not sure if this really makes sense, since advanced users typically prefer to write their own configuration files... But I will think about it. Link to comment Share on other sites More sharing options...
knireis Posted September 12, 2013 Report Share Posted September 12, 2013 Is there a specific reason for the armel version not being in SID?Ā I run jessie on my squeezeplug and it gives an dependency error with the wheezy package.Ā When i run apt-get update, i get following error:Ā Ā W: Ophalen van http://debian.yeasoft.net/btsync/dists/sid/InRelease is mislukt Ā Unable to find expected entry 'main/ry-armel/Packages' in Release file (Wrong sources.list entry or malformed file)E: Some index files failed to download. They have been ignored, or old ones used instead. Link to comment Share on other sites More sharing options...
Mektub Posted September 13, 2013 Report Share Posted September 13, 2013 Really interesting... Let me see on one of my machines:Ā tuxpoldo ~ # uname -aLinux tuxpoldo 3.2.0-4-486 #1 Debian 3.2.46-1 i586 GNU/Linuxtuxpoldo ~ # dpkg -l libc6Desired=Unknown/Install/Remove/Purge/Hold| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)||/ Name Version Architecture Description+++-=========================-=================-=================-=======================================================ii libc6:i386 2.13-38 i386 Embedded GNU C Library: Shared librariesOK. I have 2.13 installed. Can you please check, which version you have installed (dpkg -l libc6)? Please use the same commend I used. I would like to see, if your installation has anything different from usual...Ā I have:Ā uname -aLinux hpserver 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64 GNU/LinuxĀ dpkg -l libc6Desired=Unknown/Install/Remove/Purge/Hold| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)||/ Name Version Architecture Description +++-===========================-==================-==================-============================================================ ii libc6:amd64 2.17-5 amd64 Embedded GNU C Library: Shared librariesĀ Ā But then I downloaded the binaryĀ Linux_x64 (glibc 2.3)Ā fromĀ http://download-lb.utorrent.com/endpoint/btsync/os/linux-glibc23-x64/track/stable,Ā and it does work ok.Ā MektubĀ Ā Link to comment Share on other sites More sharing options...
tuxpoldo Posted September 17, 2013 Author Report Share Posted September 17, 2013 Released new packages 1.1.70-3 with an exiting addition. All Debian and Ubuntu builds are now online.Ā Changelog:Ā btsync (1.1.70-3~sid) sid; urgency=low - Fixed: added autostart support for KDE SC (/usr/share/autostart/) and OpenBox (/etc/xdg/openbox/autostart) in btsync-user - Added status indicator for btsync-user (Thanks to Mark Johnson) -- Leo Moll <leo.moll@yeasoft.com> Tue, 17 Sep 2013 13:25:09 +0200 Link to comment Share on other sites More sharing options...
stefsybo Posted September 18, 2013 Report Share Posted September 18, 2013 Thank you for the status indicator, that is indeed a nice addition. However, I got the following error when starting the new version:$ /usr/lib/btsync-user/btsync-starterBitTorrent Sync forked to background. pid = 5552Traceback (most recent call last): File "/usr/lib/btsync-user/btsyncindicator.py", line 27, in <module> import requestsImportError: No module named requestsYou need to add a dependency on the package python-requests to fix this. Link to comment Share on other sites More sharing options...
tuxpoldo Posted September 18, 2013 Author Report Share Posted September 18, 2013 Thank you for the status indicator, that is indeed a nice addition. However, I got the following error when starting the new version: ... You need to add a dependency on the package python-requests to fix this. Thanks a lot! Indeed I forgot to add the whole python dependency. I will fix this today and update also to an improved version of the indicator. Link to comment Share on other sites More sharing options...
azar Posted September 18, 2013 Report Share Posted September 18, 2013 I posted a topic -Ā "pid_file" setting not working . Perhaps if I mention it here, maybe some one would be able to make a comment on it.Ā Thank you! Link to comment Share on other sites More sharing options...
tuxpoldo Posted September 18, 2013 Author Report Share Posted September 18, 2013 Released new packages 1.1.70-4 with a few bugfixes and additions. All Debian builds are now online. As usual, Ubuntu builds will be probably available in a few hours.Changelog:btsync (1.1.70-4~sid) sid; urgency=low - Fixed: added missing python dependencies for btsync-user - Fixed: small cosmetic improvements in package texts - Fixed: btsyncindicator Issue #2 - made location of bitmaps debian conformant - Added possibility to open the web ui directly from btsyncindicator menu (Issue #3) - Added menu entry "Enable Debug Logging" in btsyncindicator menu (Issue #4) -- Leo Moll <leo.moll@yeasoft.com> Tue, 18 Sep 2013 11:20:44 +0200 Link to comment Share on other sites More sharing options...
Recommended Posts