syncthing/lib/scanner
Jakob Borg 75dcff0a0e
all: Copy owner/group from parent (fixes #5445) (#5479)
This adds a folder option "CopyOwnershipFromParent" which, when set,
makes Syncthing attempt to retain the owner/group information when
syncing files. Specifically, at the finisher stage we look at the parent
dir to get owner/group and then attempt a Lchown call on the temp file.
For this to succeed Syncthing must be running with the appropriate
permissions. On Linux this is CAP_FOWNER, which can be granted by the
service manager on startup or set on the binary in the filesystem. Other
operating systems do other things, but often it's not required to run as
full "root". On Windows this patch does nothing - ownership works
differently there and is generally less of a deal, as permissions are
inherited as ACLs anyway.

There are unit tests on the Lchown functionality, which requires the
above permissions to run. There is also a unit test on the folder which
uses the fake filesystem and hence does not need special permissions.
2019-01-25 09:52:21 +01:00
..
testdata lib/ignore, lib/scanner: Catch included items below ignored ones (#4811) 2018-05-14 09:47:23 +02:00
.gitignore Add benchmark of HashFile 2015-10-27 09:30:34 +01:00
blockqueue.go all: Display errors while scanning in web UI (fixes #4480) (#5215) 2018-11-07 11:04:41 +01:00
blocks_test.go lib/scanner, vendor: Update github.com/chmduquesne/rollinghash (fixes #5334) (#5335) 2018-11-22 08:50:06 +01:00
blocks.go lib/model: Verify request content against weak (and possibly strong) hash (#4767) 2018-05-05 10:24:44 +02:00
debug.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
doc.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
virtualfs_test.go all: Copy owner/group from parent (fixes #5445) (#5479) 2019-01-25 09:52:21 +01:00
walk_test.go lib/scanner: Check ignore patterns before reporting error (fixes #5397) (#5398) 2018-12-21 12:08:15 +01:00
walk.go lib/scanner: Check ignore patterns before reporting error (fixes #5397) (#5398) 2018-12-21 12:08:15 +01:00