Schwim

Sync on linux: I want to run it under my user

Recommended Posts

Hi there everyone,

I have installed Sync on both an Ubu and Debian OS and in both, Sync installs under user rslsync which is not very useful for my needs at all. I would like to use the files I'm syncing without dealing with ownership or permission issues.

Quote

schwim@schwim-vm-bl:~$ sudo systemctl stop resilio-sync
schwim@schwim-vm-bl:~$ systemctl start --user resilio-sync
schwim@schwim-vm-bl:~$

Did manage to get it running under my user once but restart renewed rslsync's ownership of the running process and trying the above again results in the inability to connect to the GUI at all although

Quote

schwim@schwim-vm-bl:~$ systemctl list-unit-files --user | grep enabled
resilio-sync.service enabled
schwim@schwim-vm-bl:~$

Clearly shows the process running under my user.

Can anyone tell me how I would modify the install of sync to run under my user?

Thanks for your time!

Share this post


Link to post
Share on other sites

If you want to run Sync under a  current user you need to follow the next steps:
stop the app first:
sudo service resilio-sync stop

disable the rslsync user:
sudo systemctl disable resilio-sync

enable sync service as current user:
edit file /usr/lib/systemd/user/resilio-sync.service and change "WantedBy=multi-user.target" to "WantedBy=default.target". Save. Then enable the service:
systemctl --user enable resilio-sync

and run the app:
systemctl --user start resilio-sync
-Check the results via ps aux | grep rslsynccommand.

Share this post


Link to post
Share on other sites

This worked great on my Ubu laptop but it's not working for me on my Debian install.

 

I followed the instructions above but after performing the steps, when I try to connect to the web interface, it shows as unable to load page. Before I performed the steps, I could see the web interface but it was showing the rslsync user.  The check you had me perform at the end shows:

Quote

schwim@schwim-vm-bl:~$ ps aux | grep rslsync
schwim     656  0.0  0.3 588024 14048 ?        Ssl  Dec24   3:57 /usr/bin/rslsync --config /home/schwim/.config/resilio-sync/config.json
schwim   23852  0.0  0.0  12732  2184 pts/0    S+   21:32   0:00 grep rslsync

Is there something else I need to do to make the change work?

Share this post


Link to post
Share on other sites

Hi there again, Gane,

I checked my config.json and it's set up for 8888.  I did a netstat check and it looks like the port isn't active at all:
 

Quote

 

schwim@schwim-vm-bl:~$ netstat -atun
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 127.0.0.1:17603         0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:15434           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:9050          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:17600         0.0.0.0:*               LISTEN     
tcp        0      0 10.0.2.15:41349         104.152.45.42:10799     TIME_WAIT  
tcp       32      0 10.0.2.15:45889         162.125.6.3:443         CLOSE_WAIT
tcp        0      0 10.0.2.15:41337         104.152.45.42:10799     TIME_WAIT  
tcp       32      0 10.0.2.15:51626         162.125.6.4:443         CLOSE_WAIT
tcp        0      0 10.0.2.15:41348         104.152.45.42:10799     TIME_WAIT  
tcp        0      0 10.0.2.15:41381         104.152.45.42:10799     TIME_WAIT  
tcp        0      0 10.0.2.15:40710         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41310         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41300         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41297         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41347         104.152.45.42:10799     TIME_WAIT  
tcp        0      0 10.0.2.15:41296         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41331         104.152.45.42:10799     TIME_WAIT  
tcp        0      0 10.0.2.15:57196         192.168.1.126:63768     ESTABLISHED
tcp        0      0 10.0.2.15:41390         104.152.45.42:10799     ESTABLISHED
tcp        1      0 10.0.2.15:51721         34.202.250.235:443      CLOSE_WAIT
tcp        0      0 10.0.2.15:41358         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41338         104.152.45.42:10799     TIME_WAIT  
tcp        0      0 10.0.2.15:51592         104.152.45.45:10799     ESTABLISHED
tcp        0      0 10.0.2.15:53091         162.125.18.133:443      ESTABLISHED
tcp       32      0 10.0.2.15:46384         162.125.6.3:443         CLOSE_WAIT
tcp        0      0 10.0.2.15:41301         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41305         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41369         104.152.45.42:10799     ESTABLISHED
tcp       32      0 10.0.2.15:46615         162.125.32.135:443      CLOSE_WAIT
tcp        0      0 10.0.2.15:41302         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41312         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41346         104.152.45.42:10799     TIME_WAIT  
tcp        0      0 10.0.2.15:41391         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:53071         162.125.18.133:443      ESTABLISHED
tcp        0      0 10.0.2.15:40689         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41318         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41314         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:35518         35.160.135.65:443       ESTABLISHED
tcp        0      0 10.0.2.15:41388         104.152.45.42:10799     TIME_WAIT  
tcp        0      0 10.0.2.15:41340         104.152.45.42:10799     TIME_WAIT  
tcp        0      0 10.0.2.15:41345         104.152.45.42:10799     ESTABLISHED
tcp        0      0 10.0.2.15:41389         104.152.45.42:10799     ESTABLISHED
tcp6       0      0 :::15434                :::*                    LISTEN     
tcp6       0      0 :::17500                :::*                    LISTEN     
udp        0      0 127.0.0.1:33819         0.0.0.0:*                          
udp        0      0 0.0.0.0:15434           0.0.0.0:*                          
udp     2560      0 0.0.0.0:17500           0.0.0.0:*                          
udp        0      0 0.0.0.0:18019           0.0.0.0:*                          
udp        0      0 127.0.0.1:3838          0.0.0.0:*                          
udp        0      0 10.0.2.15:3838          0.0.0.0:*                          
udp        0      0 0.0.0.0:3838            0.0.0.0:*                          
udp        0      0 0.0.0.0:1900            0.0.0.0:*                          
udp        0      0 10.0.2.15:49135         0.0.0.0:*                          
udp        0      0 0.0.0.0:68              0.0.0.0:*                          
udp        0      0 10.0.2.15:123           0.0.0.0:*                          
udp        0      0 127.0.0.1:123           0.0.0.0:*                          
udp        0      0 0.0.0.0:123             0.0.0.0:*                          
udp6       0      0 :::15434                :::*                               
udp6       0      0 :::51113                :::*                               
udp6       0      0 fe80::a00:27ff:fe72:123 :::*                               
udp6       0      0 ::1:123                 :::*                               
udp6       0      0 :::123                  :::*                               
schwim@schwim-vm-bl:~$

 

 

 

 

 

I'm not sure why but it looks like it's not running, even though I ran the commands to start it again.

Quote

schwim@schwim-vm-bl:~$ systemctl --user enable resilio-sync
schwim@schwim-vm-bl:~$ systemctl --user start resilio-sync

 

Any suggestions on getting it running?

Share this post


Link to post
Share on other sites

what exactly url you use to open Webui? from where you open it  - remote computer or local machine at localhost:8888? 

recheck that the process is still running. recheck the port with 'sudo netstat -ano  | grep 8888', see in /home/schwim/.config/resilio-sync/config.json that it indeed listens to port 8888

Share this post


Link to post
Share on other sites
On 12/26/2017 at 11:16 AM, Gane O'dwyer said:

If you want to run Sync under a  current user you need to follow the next steps:
stop the app first:
sudo service resilio-sync stop

disable the rslsync user:
sudo systemctl disable resilio-sync

enable sync service as current user:
edit file /usr/lib/systemd/user/resilio-sync.service and change "WantedBy=multi-user.target" to "WantedBy=default.target". Save. Then enable the service:
systemctl --user enable resilio-sync

and run the app:
systemctl --user start resilio-sync
-Check the results via ps aux | grep rslsynccommand.

This fixed the same problem for me which has been ongoing for a few months since I (correctly, I believe) set Sync to start up as the current user. It appears, however, that after reboot Sync was reverting to running as the rslsync user .

It is not stated in the installation instructions for Linux that this particular step:

Quote

disable the rslsync user:
sudo systemctl disable resilio-sync

is necessary to stop resilio-sync starting as the rslsync user again after reboot (which is what I assume is happening - I'm not a Linux expert).

It would be great to have up-to-date instructions for Linux installing that include this important missing detail.

Many thanks.

Share this post


Link to post
Share on other sites

i have exactly the same problem, followed all above meticulously but nothing helped. changed user as described in the official guideline. now sync is running with the default user (yay!) but gui is gone (boo!).

this is what i get when i check as mentioned above - to be honest i do not really understand what it is saying though …:

pi@raspberrypi:~ $ ps aux | grep rslsync
pi         463  2.0  2.7 118732 10460 ?        Ssl  Nov28   0:03 /usr/bin/rslsync --config /home/pi/.config/resilio-sync/config.json
pi        1255  0.0  0.5   7332  1892 pts/0    S+   00:00   0:00 grep --color=auto rslsync

 

pi@raspberrypi:~ $ sudo netstat -ano  | grep 8888
tcp        0      0 127.0.0.1:8888          0.0.0.0:*               LISTEN      off (0.00/0/0)


so… what's wrong and how can i change this?
any help is greatly appreciated – thanks in advance!!

Share this post


Link to post
Share on other sites

@asdf123123 could you please check that /home/pi/.config/resilio-sync/config.json

contains 

    "webui" :

    {

        "force_https": true,

        "listen" : "0.0.0.0:8888"

    }

 

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.