bbullis Posted July 1, 2013 Report Share Posted July 1, 2013 I am running two Ubuntu 13.04 systems. Everything seems to be syncing properly between the two machines. The only issue I am having now is when my second machine goes and gets the files, it pulls them down and sets the permissions of the file as ... owner = root and group = root.Is there anyway to configure my BT Sync setup so when it pulls down the files it won't change the file permissions to root:root ? Quote Link to comment Share on other sites More sharing options...
rdebath Posted July 1, 2013 Report Share Posted July 1, 2013 As it's a network server it's not the best idea to run btsync as root. It doesn't use anything that requires root access.Specifically, BTSync does not (as yet) understand users so will create all files as the user that it's run, it cannot change the user ID.So you need to run BTSync as the user & group that you want the files to have. (Don't forget to set your umask too). Quote Link to comment Share on other sites More sharing options...
bbullis Posted July 1, 2013 Author Report Share Posted July 1, 2013 That makes sense.I used this post to add the repository and install BTSync ... http://forum.bittorrent.com/topic/18974-debian-and-ubuntu-server-packages-for-bittorrent-sync/ So, I installed and configured BTSync using sudo or "root". Seems like the package/installation, from the link above, setup my BTSync configuration to auto-start when the computer loads (probably as root because I used that to install it). Do you know of a configuration file, and where it is located, that I could manually go in and change the user id that starts BTSync?Or do you recommend doing a apt-get remove and installing it again without sudo? Quote Link to comment Share on other sites More sharing options...
rdebath Posted July 1, 2013 Report Share Posted July 1, 2013 apt-get only works as root.If you want to install it as a user I'd say get the bare executable direct from Bittorrent (here) and start it with an "@reboot" line in the user's personal crontab. Quote Link to comment Share on other sites More sharing options...
wiebel Posted July 3, 2013 Report Share Posted July 3, 2013 You should let your initscript fix this issue. I have one like https://gist.github.com/MendelGusmao/5398362 which starts a btsync process for each user in a given list and uses ~/.sync/config.json . There are many ways for root to start a process as a user, initscrips fpr debian usually use start-stop-daemon. "apt-get only works as root" is (almost)true on the one hand but utterly unrelated. Even if you don't use any initscript at all you can simply run the "apt-get installed" program as user.Take care, "@reboot" is not supported by all cron daemons, check your local manpage. Quote Link to comment Share on other sites More sharing options...
tuxpoldo Posted July 4, 2013 Report Share Posted July 4, 2013 Hey Guys! Please read the doc. With the server packages, you have the option to create many BTsync instances running under specific user credentials. The default instance created by the server packages always runs as root but you can create additional or alternative instances (if you do not let debconf create a default instance -> first question) running under different credentials.Read the doc.Read the doc.READ THE DOC.less /usr/share/doc/btsync/README.Debianbtsync for Debian-----------------This version of BitTorrent Sync is mainly intended for server usage.It allows to start one or more BitTorrent Sync daemons based onconfiguration files located in /etc/btsyncConfiguration parameters not parsed by btsync but by the daemonscripts can be supplied as comments in the configuration file.The following parameters are supported:DAEMON_UID: A uid for supplying the user under whichthe btsync daemon should runDAEMON_GID: A gid for supplying the group under whichthe btsync daemon should run. If omittedthe daemon will run under the primary groupof the userDAEMON_UMASK: The umask for the btsync damon. If omittedthe default umask is used.The parameter definition must use an equal sign ("=")://// DAEMON_UID=jdoe// DAEMON_UMASK=0002//This example will launch the instance running under the credentialsof the user "jdoe" using 0002 as umaskThe old mechanism using the encoding in the configuration filename following the naming scheme<damon name>[.<user>[.<group>]].confis still supported but is superseded by data supplied in the configurationfile itself. Support may be dismissed in future releases.By specifying <user> and <group> it is possible to specify under whichcredentials the daemon runs. In this case it must be assured that thedaemon is able to write into the data directory specified in theconfiguration file. Some example files are provided under/etc/btsync/samplesThe file /etc/default/btsync allows to configure the way the daemonstarts:The variable AUTOSTART defines which daemons are started automatically.It can assume the valuesnone No daemon is started automaticallyall (default) All daemons are started automatically<list> Only the specified daemons are started automaticallyThe variable DAEMON_ARGS allows to specify additional commandlineparameters passed to the daemon.And if you are using btsync as the only user on a desktop machine, please take in consideration installing the desktop version because it is really more suitable for your use case: the desktop version works like the windows or mac version. A btsync instance is autostarted on user login (obviously running only in the user context).sudo apt-get install btsync-user Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.