Running Sync With Another User


monnionni

Recommended Posts

Hey!

I'm trying to create bittorrent volume with docker. It runs perfectly with root but running btsync with root doesn't keep file ownerships in place. So I build small bash script which detects ownership and creates new user with same uid&gid as files before starting btsync.

 

When i try to run btsync with this new user

$ sudo -H -u btsync bash -c 'btsync --config /btsync/config --nodaemon'

I get this:

 

btsync: /mnt/jenkins/workspace/Build-Sync-x64/linux/breakpad/client/linux/handler/minidump_descriptor.h:55: google_breakpad::MinidumpDescriptor::MinidumpDescriptor(const string&): Assertion `!directory.empty()' failed.

 

My config file:

{
  "device_name": "NAME",
  "listening_port": 55555,
  "check_for_updates": true,
  "use_upnp": true,
  "pid_file" : "/btsync/sync.pid",
  "download_limit": 0,
  "upload_limit": 0,
  "shared_folders": [
    {
      "secret": "SECRET",
      "dir": "/data",
      "use_relay_server": true,
      "use_tracker": true,
      "use_dht": false,
      "search_lan": true,
      "use_sync_trash": true
    }
  ]
}

 

What is wrong?

Link to comment
Share on other sites

The exact reason would be visible only on coredump of the process. I can suggest:

1) Check by running Sync manually via switching user to one you need.

2) Make sure this user has enough permissions to read and write: 

 - to storage folder (as it is not specified in your config - it would be the same for all users, ".sync" subfolder next to binary

 - to /btsync/synd.pid file

 - to actual folder you want to sync.

Link to comment
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.