# No sync between a file server and a web server

**URL:** https://forum.syncthing.net/t/no-sync-between-a-file-server-and-a-web-server/16734
**Category:** Support
**Created:** [April 29, 2021, 4:09pm UTC](https://forum.syncthing.net/t/no-sync-between-a-file-server-and-a-web-server/16734 "2021-04-29T16:09:20Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![msoutopico](https://forum.syncthing.net/user_avatar/forum.syncthing.net/msoutopico/32/9912_2.png) [@msoutopico](https://forum.syncthing.net/u/msoutopico)
#### Post date: [April 29, 2021, 4:09pm UTC](https://forum.syncthing.net/t/no-sync-between-a-file-server-and-a-web-server/16734/1 "2021-04-29T16:09:20Z")

</div>

Dear all,

I have a strange situation here. I’m trying to sync two folders, sitting in two respective servers (physical machines). The two servers are in the same network, in case that matters.

The path to the folder in server A is /media/data/foo/bar/folder. The path to the folder in server B is /var/www/my/folder (yes, it’s a webserver)

Syncthing runs on both servers: v1.10.0, Linux (64 bit) on server A and v1.15.1, Linux (64-bit Intel/AMD) on server B.

When I create files or folders in server B (under /var/www/my/folder), syncthing doesn’t see them.

Any tips will be most welcome. Thanks a lot. Cheers, Manuel

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [April 29, 2021, 4:35pm UTC](https://forum.syncthing.net/t/no-sync-between-a-file-server-and-a-web-server/16734/2 "2021-04-29T16:35:04Z")

</div>

First of all, you should upgrade both of them to the latest version.

Did you verify that the devices are connected, folder ids are the same, etc? Have they finished scanning?

Getting started guide covers some of these basics.

---

<div class="post-metadata">

### Author: ![msoutopico](https://forum.syncthing.net/user_avatar/forum.syncthing.net/msoutopico/32/9912_2.png) [@msoutopico](https://forum.syncthing.net/u/msoutopico)
#### Post date: [April 29, 2021, 4:42pm UTC](https://forum.syncthing.net/t/no-sync-between-a-file-server-and-a-web-server/16734/3 "2021-04-29T16:42:46Z")

</div>

Thanks for your prompt reply, Audrius.

I didn’t think the version would be a problem. I sync several machines (not servers) and they all have different versions.

The devices are connected and the folder ID is the same.

I have made a test syncing the same folder under /home/manuel/folder rather than /var/www/my/folder. The folder is empty and gets filled as soon as I accept the request from the other server and give that path.

That makes me think that it’s really something specific to the /var/www/my folder, either related to the owner, group or permission in that folder, or something else specific to the fact that it’s a web server.

I keep running tests, any more tips welcome. Cheers, Manuel

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [April 29, 2021, 4:49pm UTC](https://forum.syncthing.net/t/no-sync-between-a-file-server-and-a-web-server/16734/4 "2021-04-29T16:49:20Z")

</div>

That indeed sounds like permission issues. Which should pop up as failed items in the web UI. And if that’s not the case, still have a look at the logs if there’s anything noteworthy there.

---

<div class="post-metadata">

### Author: ![msoutopico](https://forum.syncthing.net/user_avatar/forum.syncthing.net/msoutopico/32/9912_2.png) [@msoutopico](https://forum.syncthing.net/u/msoutopico)
#### Post date: [April 29, 2021, 6:09pm UTC](https://forum.syncthing.net/t/no-sync-between-a-file-server-and-a-web-server/16734/5 "2021-04-29T18:09:33Z")

</div>

I’m almost there 🙂

I think there were two problems. I’ll explain the one I haven’t solved yet, in case you have any further tips.

Folders that I create now on the web server are re-created on the file server, so that part works (hurray!).

However, on the file server, syncthing creates sync’ed folders with user/group/permissions that don’t allow other uses (from a Windows workstation) to put files there:

```
4 drwxrwxr-x 2 ad ad 4096 Apr 29 19:22 folder

```

(ad is the user that installed or ran syncthing).

I would need to have something like this (users group):

```
4 drwxrwxr-x 2 ad users 4096 Apr 29 19:22 folder

```

or like this (world has permissions 7):

```
4 drwxrwxrwx 2 ad ad 4096 Apr 29 19:22 folder

```

How can I make syncthing do that?

About the other problem, in the webserver, I fixed it by deleting all files and folders inside the folder I want to sync. Then I changed permissions on /var/www/my/folder as `sudo chown $USER:varwwwusers folder/ -R` and added it a third time in the syncthing’s UI.

Now it seems to work, so indeed it seemed a permissions problem.

Thank you so much for your help! Cheers, Manuel

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [April 29, 2021, 9:00pm UTC](https://forum.syncthing.net/t/no-sync-between-a-file-server-and-a-web-server/16734/6 "2021-04-29T21:00:33Z")

</div>

syncthing inherits the permissions from the shell it launches. If you want it to use a different group you need to set the group via newgrp. If you want it to use different permissions, you’ve got to set the umask.

---

<div class="post-metadata">

### Author: ![msoutopico](https://forum.syncthing.net/user_avatar/forum.syncthing.net/msoutopico/32/9912_2.png) [@msoutopico](https://forum.syncthing.net/u/msoutopico)
#### Post date: [April 29, 2021, 9:20pm UTC](https://forum.syncthing.net/t/no-sync-between-a-file-server-and-a-web-server/16734/7 "2021-04-29T21:20:18Z")

</div>

> [@AudriusButkevicius](#):
>
> newgrp

Thanks, `newgrp` sounds like what I need. I’ll try and report back. Cheers, Manuel

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [May 29, 2021, 9:20pm UTC](https://forum.syncthing.net/t/no-sync-between-a-file-server-and-a-web-server/16734/8 "2021-05-29T21:20:31Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
