SCALE | Syncthing inotify Limits

N20Visuals

Dabbler
Joined
Jan 16, 2021
Messages
21
Hi all,

i'm finally gotten around to set up another container after migrating from CORE to SCALE.
This time, syncthing. After fiddling with permissions now everything is working well, but i do have one problem:

Code:
"Cloud" failed to setup inotify handler. Please increase inotify limits, see https://docs.syncthing.net/users/faq.html#inotify-limits


inside the container the command doesn't work, so i'm wondering after reading this thread:

that i might have to increase this limit within scale itself. is that possible and if yes, should i do it? or do i risk instability or even worse issues?

on another note, is it possible to run every container as a different user to be able to give more granular access to the file system? now i have to grant all apps access to my folder, kinda unsafe...?

thank you for you help :)
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
on another note, is it possible to run every container as a different user to be able to give more granular access to the file system? now i have to grant all apps access to my folder, kinda unsafe...?

It depends on the app. Most (all?) TrueCharts apps have a few fields for this:

runAsUser
runAsGroup
fsGroup

It is advised not to change runAsUser or runAsGroup because it could break the functioning of the app. Though, I've changed runAsGroup in a few apps and it didn't seem to hurt anything. May be case by case.

You can make the permissions as granular as you want by making new groups in TrueNAS and using their GID number in the fsGroup field.
 

N20Visuals

Dabbler
Joined
Jan 16, 2021
Messages
21
It depends on the app. Most (all?) TrueCharts apps have a few fields for this:

runAsUser
runAsGroup
fsGroup

It is advised not to change runAsUser or runAsGroup because it could break the functioning of the app. Though, I've changed runAsGroup in a few apps and it didn't seem to hurt anything. May be case by case.

You can make the permissions as granular as you want by making new groups in TrueNAS and using their GID number in the fsGroup field.
ah, thank you for that :) i installed the official container, there is no fsGroup setting. maybe i'll try changing to the truecharts variant.

just to clarify, so when "my" folder is owned by user 1000 and group 1001 then fsGroup for Syncthing should also be 1001?
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
ah, thank you for that :) i installed the official container, there is no fsGroup setting. maybe i'll try changing to the truecharts variant.

just to clarify, so when "my" folder is owned by user 1000 and group 1001 then fsGroup for Syncthing should also be 1001?

Yes. That should work provided that you also give group 1001 the expected permissions [for your folder].
 

qmcb23YR

Dabbler
Joined
Mar 30, 2020
Messages
12
Hi all,

i'm finally gotten around to set up another container after migrating from CORE to SCALE.
This time, syncthing. After fiddling with permissions now everything is working well, but i do have one problem:

Code:
"Cloud" failed to setup inotify handler. Please increase inotify limits, see https://docs.syncthing.net/users/faq.html#inotify-limits


inside the container the command doesn't work, so i'm wondering after reading this thread:

that i might have to increase this limit within scale itself. is that possible and if yes, should i do it? or do i risk instability or even worse issues?

on another note, is it possible to run every container as a different user to be able to give more granular access to the file system? now i have to grant all apps access to my folder, kinda unsafe...?

thank you for you help :)

System Settings -> Advanced -> Sysctl


Var
Value
Enabled
Description
fs.inotify.max_user_watches524288trueIncrease inotify limit


This is standard 'Linux stuff' so feel free to read up on this setting in detail. You might have to adjust this number to your needs, i.e. lower or increase it pending your number of files/folders scanned by Syncthing.
 

N20Visuals

Dabbler
Joined
Jan 16, 2021
Messages
21
@stavros-k: ah, good to know, i've now increased the limit manually, might have not needed it but anyway :) everything is doing what it's supposed to now, thank you.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
If you have at least one truecharts app, it automatically increases that to 524288

To be clear: this is not the case anymore.
 

void_one

Dabbler
Joined
Sep 3, 2022
Messages
10
System Settings -> Advanced -> Sysctl


Var
Value
Enabled
Description
fs.inotify.max_user_watches524288trueIncrease inotify limit


This is standard 'Linux stuff' so feel free to read up on this setting in detail. You might have to adjust this number to your needs, i.e. lower or increase it pending your number of files/folders scanned by Syncthing.
I just updated to Bluefin and had to delete and then reinstall synchthing. I already have the inotify handler limit manually set - following your post exactly and I'm still getting the error. Everything seems to be working fine - is something I should worry about? I don't understand why I'm still getting the error.
 

dean.viens

Dabbler
Joined
Feb 23, 2023
Messages
32
I just updated to Bluefin and had to delete and then reinstall synchthing. I already have the inotify handler limit manually set - following your post exactly and I'm still getting the error. Everything seems to be working fine - is something I should worry about? I don't understand why I'm still getting the error.
how do I change the max user watches truenas scale?
 
Top