ERROR says : Failed to create folder root directory mkdir /var/lib/syncthingsyncthingTEST: permission denied

The directory should’ve been /var/lib/syncthing/syncthingTEST (notice the additional /). It’s not really a permissions issue. Syncthing should be able to create directories under /var/lib/syncthing, but it doesn’t have the permissions to create directories under /var/lib.