dswd

Feedback: BTSync on Linux

Recommended Posts

Hi, I just installed BTSync on 3 computers running Linux and want to share my feedback.

In general it works but the linux binary could be improved a lot:

My first impression was that the binary did nothing. It did not print anything, it did not do anything. Apearently it started a daemon and returned without even printing a single line. So I propose the following:

* The binary should display help when called without arguments

* When the binary spawns the daemon, it should say so and maybe display the process id.

Another thing that I found complicated was the web configuration.

* The default config listenes 0.0.0.0 which should be changed to 127.0.0.1 for security reasons as only http is used.

* The passwords should not be required in cleartext, instead password hashes should be supported (this should be enough to authenticate a user).

Also I found the configuration very unintuitive.

* The program should create the directory ~/.btsync and default to that instead of .sync in the folder of the binary.

* The program should create a config file in ~/.btsync/config with sane defaults and use that if none is given

* The program should be changeing the plain text config file instead of writing to some binary settings file. It is not very intuitive that settings are stored in two locations one of which is non human readable.

As I said, the main functionality is just fine but imho these points have to be addressed before it can be used by average users.

If this was open source I would likely have attached a patch...

Share this post


Link to post
Share on other sites

Btsync runs fine on debian testing 32 and 64 bit. But i can only run it as root, running it as user gives errors.

But now the synced files cannot be modified anymore with the 'normal' user.

Is it possible to make btsync run as a non-root user?

Share this post


Link to post
Share on other sites

sierink@fileserver:~$ ./btsync

Can't open pid file /home/sierink/.sync//sync.pid. No such file or directory

solved it by creating the directory and file myself.

How can i autostart btsync when i start the headless server on which i want to run btsync?

Share this post


Link to post
Share on other sites
How can i autostart btsync when i start the headless server on which i want to run btsync?

I adapted a init.d script to be used with BTSync in Debian environments (soon I'll write with an upstart version) - https://gist.github....lGusmao/5398362

* The passwords should not be required in cleartext, instead password hashes should be supported (this should be enough to authenticate a user).

I agree! Maybe Transmission's approach could be used: you put a cleartext password in a settings.json and when Transmission is ran, it detects if it's cleartext. If positive, Transmisson hashes the password then updates the file with the hash.

Also I found the configuration very unintuitive.

* The program should create the directory ~/.btsync and default to that instead of .sync in the folder of the binary.

* The program should create a config file in ~/.btsync/config with sane defaults and use that if none is given

I say more: btsync is considering the location of itself. When running from /usr/bin it'll try to use /usr/bin/.sync/. It sounds no good.

Share this post


Link to post
Share on other sites

I adapted a init.d script to be used with BTSync in Debian environments (soon I'll write with an upstart version) - https://gist.github....lGusmao/5398362

I tried your init.d script and it works, but it prevents the harddrive from spinning down. Every 10 seconds or so the disc is accessed.

When i start btsync manually, the disc is accessed every 10 minutes as intended by the sync app to check for file changes.

Share this post


Link to post
Share on other sites

Hi, sorry for my poor level and language but I have a problem like maybe a lot of users:

zu@zu-Compaq-Presario-A900-Notebook-PC:~$ cd /home/zu

zu@zu-Compaq-Presario-A900-Notebook-PC:~$ sudo ./btsync

[sudo] password for zu:

zu@zu-Compaq-Presario-A900-Notebook-PC:~$ ./btsync

Can't lock pid file. It seems BitTorrent Sync is already running with pid 2503

Do you have the solution? and a easier method to install it ?

Share this post


Link to post
Share on other sites

I'm getting 100% cpu usage on Ubuntu 12.04. It seems to be working but I cannot get any debug logs.

Works fine on Debian 6 though so I was wondering if anyone has any ideas on what could be wrong?

Share this post


Link to post
Share on other sites

Hi, sorry for my poor level and language but I have a problem like maybe a lot of users:

zu@zu-Compaq-Presario-A900-Notebook-PC:~$ cd /home/zu

zu@zu-Compaq-Presario-A900-Notebook-PC:~$ sudo ./btsync

[sudo] password for zu:

zu@zu-Compaq-Presario-A900-Notebook-PC:~$ ./btsync

Can't lock pid file. It seems BitTorrent Sync is already running with pid 2503

Do you have the solution? and a easier method to install it ?

Same thing for me, also when I try to kill the process, it says no such pid exists....

Share this post


Link to post
Share on other sites

I tried your init.d script and it works, but it prevents the harddrive from spinning down. Every 10 seconds or so the disc is accessed.

When i start btsync manually, the disc is accessed every 10 minutes as intended by the sync app to check for file changes.

This is weird but I believe that it's start-stop-daemon's fault, somehow.

How you found that 10 seconds is the disk access interval?

Running btsync --config from the command line shows the same symptom?

Share this post


Link to post
Share on other sites

This is weird but I believe that it's start-stop-daemon's fault, somehow.

How you found that 10 seconds is the disk access interval?

Running btsync --config from the command line shows the same symptom?

I use this (http://code.google.com/p/spindown/) to spindown and monitor the disks. When i stop the deamon with your script disk accessing is stopped, when i start the deamon, disks are accessed again about every 10 seconds.

Running the deamon with btsync --config spins tje disks up every 10 minutes as programmed by the developers to scan for file changes.

Share this post


Link to post
Share on other sites

This is how I start it as a system job with ubuntu (last LTS version, couldn't remember number) using upstart.

1. Create btsync.conf on /etc/init.d/

2. file contains 2 lines:

# home in my setup is another hard drive.

start on mounted MOUNTPOINT=/home TYPE=ext4

# starts as non-root user

exec start-stop-daemon --start -c myuser --exec /home/myuser/btsync

3. this satisfies my needs.

Share this post


Link to post
Share on other sites

This is how I start it as a system job with ubuntu (last LTS version, couldn't remember number) using upstart.

1. Create btsync.conf on /etc/init.d/

2. file contains 2 lines:

# home in my setup is another hard drive.

start on mounted MOUNTPOINT=/home TYPE=ext4

# starts as non-root user

exec start-stop-daemon --start -c myuser --exec /home/myuser/btsync

3. this satisfies my needs.

How I did it (I'm very new to linux, been using it for ~ 3 weeks now and I didn't know that I could run scripts on mounts):-

cat /etc/init.d/btsync
sudo -u automatic /home/automatic/.sync/btsync --config /home/automatic/.sync/sync.conf

Seems to work fine for me.

Share this post


Link to post
Share on other sites

Please pardon my newbness, but is it possible to run two instances of btsync on Ubuntu Server?

I'm running into permissions issues when syncing folders. I installed btsync on /home/'myuser'/btsync , and use the read only secret as a "backup solution" to push files from my PC and MAC to my NAS (Ubuntu Server). But, when I want to sync another users's files to another directory "/media/documents/'anotheruser' with the owner being 'anotheruser' and chmod set to 775, I still get permission denied.

Even when I changed the owner of that directory to 'myuser' btsync still doesn't sync the files.

Share this post


Link to post
Share on other sites

I have a problem. Linux doesn't remember my settings. When I kill btsync and start it again it starts as a fresh application without any settings in it.

I have it installed on Ubuntu 12.10.

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.