after restart syncthing by gui my sync , my folder permition change to drwx------ how keep origin permition

question: after restart syncthing by gui using Actions>restart my default folder /var/sync change mod from 777 to 700 how can I stop this change

System: Linux 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux This Device: Version v1.14.0, Linux (64-bit Intel/AMD) /lib/systemd/system/syncthing@.service:

[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=man:syncthing(1)
After=network.target

[Service]
User=%i
ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0 
Restart=on-failure
RestartSec=5
SuccessExitStatus=3 4
RestartForceExitStatus=3 4

# Hardening
ProtectSystem=full
PrivateTmp=true
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target

/root/.config/syncthing/config.xml:

<folder id="default" label="Default Folder" path="/var/sync/default" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
        <filesystemType>basic</filesystemType>
        <device id="XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX" introducedBy="">
            <encryptionPassword></encryptionPassword>
        </device>
        <minDiskFree unit="%">5</minDiskFree>
        <versioning>
            <cleanupIntervalS>3600</cleanupIntervalS>
            <fsPath></fsPath>
            <fsType>basic</fsType>
        </versioning>
        <copiers>0</copiers>
        <pullerMaxPendingKiB>0</pullerMaxPendingKiB>
        <hashers>0</hashers>
        <order>random</order>
        <ignoreDelete>false</ignoreDelete>
        <scanProgressIntervalS>0</scanProgressIntervalS>
        <pullerPauseS>0</pullerPauseS>
        <maxConflicts>10</maxConflicts>
        <disableSparseFiles>false</disableSparseFiles>
        <disableTempIndexes>false</disableTempIndexes>
        <paused>false</paused>
        <weakHashThresholdPct>25</weakHashThresholdPct>
        <markerName>.stfolder</markerName>
        <copyOwnershipFromParent>false</copyOwnershipFromParent>
        <modTimeWindowS>0</modTimeWindowS>
        <maxConcurrentWrites>2</maxConcurrentWrites>
        <disableFsync>false</disableFsync>
        <blockPullOrder>standard</blockPullOrder>
        <copyRangeMethod>standard</copyRangeMethod>
        <caseSensitiveFS>false</caseSensitiveFS>
        <junctionsAsDirs>false</junctionsAsDirs>
    </folder>


after restart my /var/sync ll info: ll /var/ drwx------ 5 syncuser www-data 4096 Apr 26 18:28 sync/ before restart ll info: ll /var/ drwxrwxrwx 5 syncuser www-data 4096 Apr 26 18:24 sync/

Syncthing doesn’t/shouldn’t chmod the sync folder itself, instead leaving it at whatever it’s already set to. Your output at the end says you’re looking at /var/sync which is above the sync folder at /var/sync/default so Syncthing should definitely not being doing chmods there. So, not sure what you’re seeing.

The exception would be if /var/sync is where you’ve told Syncthing to store it’s config and database. That directory does get chmodded to 0700. But it looks like you’re using /root/.config, so I don’t know.