syncthing/lib/model
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/fs, lib/model: Make tests caching compatible (fixes #4749) (#4804) 2018-03-13 14:03:10 +01:00
bytesemaphore_test.go lib/model: Allow limiting number of concurrent scans (fixes #2760) (#4888) 2018-12-05 08:40:05 +01:00
bytesemaphore.go lib/model: Allow limiting number of concurrent scans (fixes #2760) (#4888) 2018-12-05 08:40:05 +01:00
debug.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
deviceactivity_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
deviceactivity.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
devicedownloadstate_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
devicedownloadstate.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
folder_recvonly_test.go lib/model: Improve filesystem operations during tests (fixes #5422) 2019-01-11 12:56:05 +00:00
folder_recvonly.go all: Check files on disk/in db when deleting/renaming (fixes #5194) (#5195) 2018-09-16 09:48:14 +02:00
folder_sendonly.go all: Add receive only folder type (#5027) 2018-07-12 11:15:57 +03:00
folder_sendrecv_test.go all: Copy owner/group from parent (fixes #5445) (#5479) 2019-01-25 09:52:21 +01:00
folder_sendrecv.go all: Copy owner/group from parent (fixes #5445) (#5479) 2019-01-25 09:52:21 +01:00
folder_test.go all: Display errors while scanning in web UI (fixes #4480) (#5215) 2018-11-07 11:04:41 +01:00
folder.go lib/model: Don't pull if ignores failed to load and cleanup (#5418) 2019-01-01 10:17:14 +01:00
folderstate.go lib/model: Allow limiting number of concurrent scans (fixes #2760) (#4888) 2018-12-05 08:40:05 +01:00
model_test.go lib/model: Improve filesystem operations during tests (fixes #5422) 2019-01-11 12:56:05 +00:00
model.go all: Send Close BEP msg on intentional disconnect (#5440) 2019-01-09 17:31:09 +01:00
progressemitter_test.go lib/model: Improve filesystem operations during tests (fixes #5422) 2019-01-11 12:56:05 +00:00
progressemitter.go lib: chmod -x on progressemitter.go and errors.go (#5281) 2018-10-21 16:08:14 +01:00
queue_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
queue.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
requests_test.go lib/model: Improve filesystem operations during tests (fixes #5422) 2019-01-11 12:56:05 +00:00
sentdownloadstate.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
sharedpullerstate_test.go lib/model: Improve filesystem operations during tests (fixes #5422) 2019-01-11 12:56:05 +00:00
sharedpullerstate.go all: Implement variable sized blocks (fixes #4807) 2018-04-16 19:08:50 +01:00
testos_test.go lib/model: Improve filesystem operations during tests (fixes #5422) 2019-01-11 12:56:05 +00:00
util.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00