Starting btsync as user


Vince42

Recommended Posts

Hi,

 

when I start btsync as user by specifying the UID of 'user', the service will not start and sync.log says

Error while adding folder /home/user/sync/share1: Can't open the destination folder.

The .btsync folder exists, the sync/share1 folder exists, they are all accessible by user.

When I start the daemon manually as root, it works.

When I stop the daemon, chown the files to user and restart the service, it works.

 

What am I missing here that the service will not initially start with user privileges?

 

Cheers

Vince

Link to comment
Share on other sites

when I start btsync as user by specifying the UID of 'user', the service will not start and sync.log says

Error while adding folder /home/user/sync/share1: Can't open the destination folder.
The .btsync folder exists, the sync/share1 folder exists, they are all accessible by user.

When I start the daemon manually as root, it works.

When I stop the daemon, chown the files to user and restart the service, it works.

 

What am I missing here that the service will not initially start with user privileges?

 

 

There are two internal files and a directory of btsync that are stored in the root of any shared folder:

  • .SyncID
  • .SyncIgnore
  • .SyncArchive

You must make sure, that btsync will be able to access all of them. If you have launched btsync initially as root, these files/directories have been created as root. Before switching to user mode operation, you MUST MAKE SURE, THAT EVERYTHING IS ACCESSIBLE AND WRITABLE. Please see the initial posting.

 

When I start the daemon manually as root, it works.

 

Obviously it works. root can access everything.

 

 

When I stop the daemon, chown the files to user and restart the service, it works.

 

After that you should never start the daemon instance as root, because this will change the file permissions/ownership.

Please try to really understand what you are doing, otherwise you will never get it running. Read carefully the initial posting: everything related to permissions is described there in detail.

Link to comment
Share on other sites

Hi,

 

I guess I have been misunderstood again.

 

I started from scratch, ie I removed all btsync related files, made all directories accessible for the user, started the service as user and got the error message.

 

The only way I could get the service running was running it as root, stopping it, chowning everything to the user and restarting it with user privileges.

 

I fully understand what I am doing - otherwise I would have been stuck with "btsync can't be run with user privileges" - the fact that the intermediate step with root works simply tells me that there is really some issue with permissions.

 

Please provide the link to "the initial posting" - I will verify the permissions again.

 

Thank you very much in advance!

 

Cheers

Vince

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.