marcel_sch Posted June 15, 2013 Report Share Posted June 15, 2013 Why don't you just make a symlink yourself?sudo rm -rf /var/lib/btsybcsudo ln -s <wathever_the_dir_you_want> /var/lib/btsybcmorning,i thought about a symlink too, but i think it is possible that a new user of btsync will not have the information about the processes inside that directory. it was only an idea of me to integrate it. maybe with a message like: "may be changed on systems with / on a sd-card or ssd" ;-)Something like this... But perhaps in the next release...thanks for your great support.greetingsmarcel_sch Link to comment Share on other sites More sharing options...
tuxpoldo Posted June 17, 2013 Author Report Share Posted June 17, 2013 OK - now I understand your needs behind the idea of making the data path configurable. Adding the data path as a configurable parameter is not so simple as for the other parameters, since there are a lot of eventualities to keep in consideration:If you offer a debconf based configuration, you should be aware of the fact that not every user is an advanced user (sysadmins prefer to do everything on their own ;-). So you must make sure, that all data entered is tested for consistency as much as possibleSince you can change these parameters also after the installation (using dpkg-reconfigure) you must handle also the situation where an already existing data directory has to be moved to a new location with all error possibilities this may imply...The solution with the sybolic link is indeed a quite usual way to solve "hardcoded" paths, but in any case I will think about also adding the possibility to reconfigure the path... Link to comment Share on other sites More sharing options...
tobox Posted June 18, 2013 Report Share Posted June 18, 2013 I tried your apt-source, but unfortunately, it does not work on my machines. The reason is, that debian.yeasoft.net claims to have an IPv6 address, but in fact is does not have one:$ ping6 -n debian.yeasoft.netPING debian.yeasoft.net(2001:4dd0:fbc4::42) 56 data bytes^C--- debian.yeasoft.net ping statistics ---4 packets transmitted, 0 received, 100% packet loss, time 3023ms$ ping -n debian.yeasoft.netPING webhost2.yeasoft.net (77.232.232.105) 56(84) bytes of data.64 bytes from 77.232.232.105: icmp_seq=1 ttl=53 time=8.07 ms Link to comment Share on other sites More sharing options...
tuxpoldo Posted June 18, 2013 Author Report Share Posted June 18, 2013 I tried your apt-source, but unfortunately, it does not work on my machines. The reason is, that debian.yeasoft.net claims to have an IPv6 address, but in fact is does not have one:Thank you for the report! The problem was an error in the firewall configuration (forgot to make the web server rules permanent). Now the site is reachable also via IPv6. Sorry for the inconvenience. I'm adding IPv6 to all my servers in the datacenter but I'm still learning ;-) Link to comment Share on other sites More sharing options...
acmodeu Posted June 20, 2013 Report Share Posted June 20, 2013 How to set up umask for btsync in debian? Link to comment Share on other sites More sharing options...
tuxpoldo Posted June 20, 2013 Author Report Share Posted June 20, 2013 How to set up umask for btsync in debian?Mhhh. There is no straightforward way to achieve this... But it's an interesting question. I see that the umask can be passed to the start-stop-daemon command responsible for launching btsync in the startup script... I will think about the possibility to configure additional parameters perhaps with a sidecar-configuration file.... Stay tuned. Link to comment Share on other sites More sharing options...
Disappointed Cat Posted June 21, 2013 Report Share Posted June 21, 2013 Why not just use file ACLs?It also has the advantage of being independent from any program. Link to comment Share on other sites More sharing options...
acmodeu Posted June 21, 2013 Report Share Posted June 21, 2013 I will think about the possibility to configure additional parameters perhaps with a sidecar-configuration file.Yes, something like "umask": 2, in the settings.json of the transmission-daemon. On the other hand transmission-daemon starts from the name of itself, but btsync starts from the name of the root. If it matters of course... Link to comment Share on other sites More sharing options...
MonoTouch Posted June 22, 2013 Report Share Posted June 22, 2013 Hi unfortunately I have a problem with the package =(Raspberry Pi with raspbmc-rls-1.0-hardfp-b20130616-u20130616, freshly installes yesterdayI install via aptitude and debconf works fine, config files is createdfirst thing:root@raspbmc:/usr/lib/btsync# service btsync restart[ ok ] Stopping btsync instance 'debconf-default':.[....] Autostarting btsync instance 'debconf-default':root@raspbmc:/usr/lib/btsync#second (btsync-daemon has +x):root@raspbmc:/usr/lib/btsync# ./btsync-daemonbash: ./btsync-daemon: Datei oder Verzeichnis nicht gefundenThanks for all the work you put in this here!SOLVED:forgot about this little detail after executing it works =), perhals you can include it in your debconf scriptln -s /lib/arm-linux-gnueabihf/ld-linux.so.3 /lib/ld-linux.so.3 Link to comment Share on other sites More sharing options...
sparkman Posted June 22, 2013 Report Share Posted June 22, 2013 Hi,im very new to linux im trying to get this installed on my Pi, debian wheezy (using SSH), i seem to running into problems.1. I first typed "sudo su" for root privileges.2. i then typed, sudo gpg --keyserver pgp.mit.edu --recv-keys 6BF18B15 sudo gpg --armor --export 6BF18B15 | apt-key add - "ok" feedback 3. here is where i run into problems, i typed, sudo echo deb http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.list "bash: lsb_release: command not found"can someone explain what i've done wrong, thanks in advance. Link to comment Share on other sites More sharing options...
affinity Posted June 23, 2013 Report Share Posted June 23, 2013 If you've done "sudo su" already, then why are you repeating sudo for the other commands?You probably want "sudo su -" anyway, to pickup the super user environment properly. Link to comment Share on other sites More sharing options...
sparkman Posted June 23, 2013 Report Share Posted June 23, 2013 If you've done "sudo su" already, then why are you repeating sudo for the other commands?You probably want "sudo su -" anyway, to pickup the super user environment properly.Thanks, but there's still a problem with:echo deb http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.listi keep getting "lsb_release: command not found" Link to comment Share on other sites More sharing options...
tuxpoldo Posted June 23, 2013 Author Report Share Posted June 23, 2013 Thanks, but there's still a problem with:echo deb http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.listi keep getting "lsb_release: command not found"Strange, but true. It seems that your installation of debian wheezy does not contain the command lsb_release. This should not be, since lsb_release is part of the base file layout of any debian (and not only...) system. If you are really sure, that "wheezy" is the name of your release, you can also enter it manually:echo deb http://debian.yeasoft.net/btsync wheezy main contrib non-free >> /etc/apt/sources.list.d/btsync.listBut if your debian is so different (or broken) that tehre is no lsb_release, it is likely that you will encounter more problems when trying to run btsync... Link to comment Share on other sites More sharing options...
sparkman Posted June 23, 2013 Report Share Posted June 23, 2013 Thanks tuxpoldo,I managed to get it running, although when i ran "apt-get update" it did show "failed to fetch" and "404 not found".Running "apt-get install btsync" worked like a charm.I am running Raspbian "wheezy" on my Pi, should i be running a different OS?The only alternative i found was Soft-float Debian "wheezy". Link to comment Share on other sites More sharing options...
uin2u Posted June 29, 2013 Report Share Posted June 29, 2013 Delete plz Link to comment Share on other sites More sharing options...
uin2u Posted June 29, 2013 Report Share Posted June 29, 2013 INSTALLATION IN DEBIANCurrently there are packages available for Debian squeeze, wheezy and sid supporting both i386 and amd64. A build for armhf and armel is available too for Debian Wheezy (rasbian). The packages can be easily installed by adding the btsync repository and then installing as usual:sudo gpg --keyserver pgp.mit.edu --recv-keys 6BF18B15sudo gpg --armor --export 6BF18B15 | apt-key add -sudo echo deb http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.listsudo echo deb-src http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.listsudo apt-get updatesudo apt-get install btsyncIf you are not using Ubuntu or Debian or you want only to understand how this kind of deployment works, download the btsync deployment scripts here.Do you plan to update the repository for version 1.1.22? Link to comment Share on other sites More sharing options...
tuxpoldo Posted June 29, 2013 Author Report Share Posted June 29, 2013 Updated all packages to 1.1.22 - All Debian builds are now online. Ubuntu builds are on the way and should be online in about 1-2 hours.Changelog:btsync (1.1.22-1~sid) sid; urgency=low * New upstream release - Added support for specifying the credentials in the configuration file using DAEMON_UID=xyz and DAEMONGID=xyz in the comments - Added support for specifying the umask in the configuration file using DAEMON_UMASK=nnnn in the comments - Added debconf support for specifying the umask -- Leo Moll <leo.moll@yeasoft.com> Sat, 29 Jun 2013 16:17:11 +0200All the new configuration optios are not visible during initial setup (since it is only fine tuning). If you want to change these options, you have to do asudo dpkg-reconfigure btsyncThe umask feature was inspired by acmodeu:How to set up umask for btsync in debian?His idea to put the information in the configuration file, did not work, since btsync does not accept unknown variables there, but inspired me to find a solution to this problem and also to improve the user and group specification. Furthermore there is now a possibility to add more configuration parameters in the future... Link to comment Share on other sites More sharing options...
tuxpoldo Posted June 29, 2013 Author Report Share Posted June 29, 2013 I am running Raspbian "wheezy" on my Pi, should i be running a different OS?The only alternative i found was Soft-float Debian "wheezy".Raspbian wheezy is an excellent choice. I'm only wondering, that lsb_release is not included. It is part of the default packages installed by every debian... Very strange. I have also a Raspberry Pi with raspbian installed (I use it to build the packages), but I've not tested if lsb_release is included...Anyway... now it works and this is the most important thing ;-) Link to comment Share on other sites More sharing options...
acmodeu Posted June 30, 2013 Report Share Posted June 30, 2013 Strange, I've set umask to 0002 but still i'm getting drwxr-s--- on newly creadted and synced folders. Link to comment Share on other sites More sharing options...
tuxpoldo Posted June 30, 2013 Author Report Share Posted June 30, 2013 Strange, I've set umask to 0002 but still i'm getting drwxr-s--- on newly creadted and synced folders.You are right. I made now some extensive tests, and I verified that btsync does something strange into the replicated folders. But let's start at the beginning: basically the feature works. Let's remember: the umask defines the bits that are masked out before creating a file/directory. That means: the standard library sets 777 as permissions for directories and 666 as permissions for files. Filtered by the default umask, this results in 755 and 644.Basically this seems to work with btsync. If I look at the logfile (/var/lib/btsync/sync.log) I get exactly the permissions I expected:with umask 0022:yeasoft-gate2 /mnt/data/btsync-areas/leo # ls -la /var/lib/btsync/sync.log-rw-r--r-- 1 root root 264 Jun 30 13:10 /var/lib/btsync/sync.logwith umask 0002:yeasoft-gate2 /mnt/data/btsync-areas/leo # ls -la /var/lib/btsync/sync.log-rw-rw-r-- 1 root root 264 Jun 30 13:12 /var/lib/btsync/sync.logwith umask 0000:yeasoft-gate2 /mnt/data/btsync-areas/leo # ls -la /var/lib/btsync/sync.log-rw-rw-rw- 1 root root 264 Jun 30 13:15 /var/lib/btsync/sync.logThe problem can be viewed in the replicated files:with umask 0000:yeasoft-gate2 /mnt/data/btsync-areas/leo/test # ls -latotal 16drwxr-xr-x 3 root root 4096 Jun 30 13:30 .drwxr-xr-x 11 root root 4096 Jun 30 13:30 ..drwxr-xr-x 2 root root 4096 Jun 30 13:30 testumask0000-rw-rw-r-- 1 root root 5 Jun 30 13:29 testumask0000.txtwith umask 0002:yeasoft-gate2 /mnt/data/btsync-areas/leo/test # ls -latotal 24drwxr-xr-x 4 root root 4096 Jun 30 13:33 .drwxr-xr-x 11 root root 4096 Jun 30 13:30 ..drwxr-xr-x 2 root root 4096 Jun 30 13:30 testumask0000-rw-rw-r-- 1 root root 5 Jun 30 13:29 testumask0000.txtdrwxr-xr-x 2 root root 4096 Jun 30 13:33 testumask0002-rw-rw-r-- 1 root root 5 Jun 30 13:32 testumask0002.txtwith umask 0022:yeasoft-gate2 /mnt/data/btsync-areas/leo/test # ls -latotal 32drwxr-xr-x 5 root root 4096 Jun 30 13:35 .drwxr-xr-x 11 root root 4096 Jun 30 13:30 ..drwxr-xr-x 2 root root 4096 Jun 30 13:30 testumask0000-rw-rw-r-- 1 root root 5 Jun 30 13:29 testumask0000.txtdrwxr-xr-x 2 root root 4096 Jun 30 13:33 testumask0002-rw-rw-r-- 1 root root 5 Jun 30 13:32 testumask0002.txtdrwxr-xr-x 2 root root 4096 Jun 30 13:35 testumask0022-rw-r--r-- 1 root root 5 Jun 30 13:34 testumask0022.txtWhat we see here is, that the umask feature works perfectly. None of the created files and directories contains masked out bits. But what we see here, shows also, that btsync does not create files and directories with standard permissions, but manipulates the permissions.My theory is:btsync always creates directories with 0755 and for this reason, an umask of 0002 or 0000 does not change anythingbtsync always creates files with 664 and for this reason, only an umask of 0002 or 0000 changes something....Hey BT Developers: any clues? Link to comment Share on other sites More sharing options...
sparkman Posted June 30, 2013 Report Share Posted June 30, 2013 Raspbian wheezy is an excellent choice. I'm only wondering, that lsb_release is not included. It is part of the default packages installed by every debian... Very strange. I have also a Raspberry Pi with raspbian installed (I use it to build the packages), but I've not tested if lsb_release is included...Anyway... now it works and this is the most important thing ;-)lsb_release is not included it seems, i tried a clean installation before i followed your steps i used:sudo apt-get install lsb-releaseit seems to work after that. Link to comment Share on other sites More sharing options...
ovizii Posted July 1, 2013 Report Share Posted July 1, 2013 I'm failing at the very first step, any idea what could be wrong? Running this on a Debian wheezy 64bit installation.gpg --keyserver pgp.mit.edu --recv-keys 6BF18B15gpg: requesting key 6BF18B15 from hkp server pgp.mit.edu?: pgp.mit.edu: Connection timed outgpgkeys: HTTP fetch error 7: couldn't connect: Connection timed outgpg: no valid OpenPGP data found.gpg: Total number processed: 0 Link to comment Share on other sites More sharing options...
tuxpoldo Posted July 1, 2013 Author Report Share Posted July 1, 2013 No. From here it works. But look at the error message:gpg: requesting key 6BF18B15 from hkp server pgp.mit.edu?: pgp.mit.edu: Connection timed outgpgkeys: HTTP fetch error 7: couldn't connect: Connection timed outAnd now try to navigate to: http://pgp.mit.eduIf you can reach it, alsogpg --keyserver pgp.mit.edu --recv-keys 6BF18B15should work. If not, you have a generic connection problem to pgp.mit.edu. There may be several reasons for this:Sometimes websites are offline if they have problems with the hardware. This is only a temporary errorMaybe the route from you to them is offline because of a failure in one of the routing sites. Also this is only a temporary failureMaybe you live in a country in which cryptography is forbidden and the government blocks access to sites with potential cryptographic content. Basically also this is a temporary failure, if people elects a different government or people starts a revolution ;-) Link to comment Share on other sites More sharing options...
ovizii Posted July 1, 2013 Report Share Posted July 1, 2013 did a bit of googling and it seems the keys are retrieved via port 11371. Key retrieved successfully.Unfortunately, I couldn't read the first question I was asked after installation so to be safe I selected NO. Now what are my next steps? => http://screencast.com/t/IIqgGyFakpzHad a look at the configs and just not sure where to start... i.e. I'd need to disable the webui since its on a server and I'm happy editing config files. I'd also need to know if btsync really only uses ONE port? => listening_port as I'd need to configure my firewall to let btsync traffic through...I'd be very grateful for any hints on where to start :-) Link to comment Share on other sites More sharing options...
tuxpoldo Posted July 1, 2013 Author Report Share Posted July 1, 2013 did a bit of googling and it seems the keys are retrieved via port 11371. Key retrieved successfully.gpg can use different protocols to retrieve keys. HTTP is one, but there is also a direct keyserver protocol that uses port 11371. The error message you got, suggests that HTTP was used as protocol...Unfortunately, I couldn't read the first question I was asked after installation so to be safe I selected NO.The first question asked you, if you want to define a default BitTorrent Sync instance. That means: debconf asks you a series of questions, and than it creates a configuration file for a default instance for you. This file is maintained by debconf and should not be edited manually. You can modify the configuration settings by executing the commandsudo dpkg-reconfigure btsyncAnyway you can add additional configuration files if you want to run more than one instance of btsync on a machine. The only reason to do that, usually is to have btsync to run under different user credentials.Now what are my next steps? => http://screencast.com/t/IIqgGyFakpzSomething must be wrong with your terminal window size....Had a look at the configs and just not sure where to start...i.e. I'd need to disable the webui since its on a server and I'm happy editing config files.I'd also need to know if btsync really only uses ONE port? => listening_port as I'd need to configure my firewall to let btsync traffic through...I'd be very grateful for any hints on where to start :-)For most people, creating the config file via debconf would be OK. But if you do not want a web gui, you must create your own configuration files manually. In this case, answering "No" to the first question, is the right choice. In order to create configuration files, you should look at the samples - especially at /etc/btsync/samples/complex.conf - a fully commented version.For all other questions reguarding the functionality of btsync, you should post your questions in separate topics of the forum, since this topic is only related to the debian packaging itself. Link to comment Share on other sites More sharing options...
Recommended Posts