syncthing/lib/fs
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
..
basicfs_test.go all: Copy owner/group from parent (fixes #5445) (#5479) 2019-01-25 09:52:21 +01:00
basicfs_unix.go lib/fs: Try EvalSymlinks without '\\?\' prefix on failure (fixes #5226) (#5227) 2018-09-26 19:28:20 +01:00
basicfs_watch_errors_linux.go lib/fs: Fix and update error about inotify watch limit (fixes #4833) (#4835) 2018-03-23 12:56:38 +01:00
basicfs_watch_errors_others.go all: Add filesystem notification support 2017-10-20 14:52:55 +00:00
basicfs_watch_eventtypes_fen.go vendor: github.com/Zillode/notify is now github.com/syncthing/notify (#4813) 2018-03-14 14:48:22 +01:00
basicfs_watch_eventtypes_inotify.go vendor: github.com/Zillode/notify is now github.com/syncthing/notify (#4813) 2018-03-14 14:48:22 +01:00
basicfs_watch_eventtypes_kqueue.go vendor: github.com/Zillode/notify is now github.com/syncthing/notify (#4813) 2018-03-14 14:48:22 +01:00
basicfs_watch_eventtypes_other.go vendor: github.com/Zillode/notify is now github.com/syncthing/notify (#4813) 2018-03-14 14:48:22 +01:00
basicfs_watch_eventtypes_readdcw.go lib/fs: Catch size-preserving changes on windows (fixes #5050) (#5056) 2018-07-09 18:29:22 +01:00
basicfs_watch_test.go lib/fs: Skip some tests on OpenBSD (fixes #5077) (#5466) 2019-01-19 08:28:57 +01:00
basicfs_watch_unsupported.go all: Add filesystem notification support 2017-10-20 14:52:55 +00:00
basicfs_watch.go lib/fs: Try EvalSymlinks without '\\?\' prefix on failure (fixes #5226) (#5227) 2018-09-26 19:28:20 +01:00
basicfs_windows_test.go lib/fs: Case insensitive conversion to rel path on windows (fixes #5183) (#5176) 2018-09-11 22:30:32 +02:00
basicfs_windows.go lib/fs: Try EvalSymlinks without '\\?\' prefix on failure (fixes #5226) (#5227) 2018-09-26 19:28:20 +01:00
basicfs.go all: Copy owner/group from parent (fixes #5445) (#5479) 2019-01-25 09:52:21 +01:00
debug.go lib/fs: Introduce walkfs debug facility (#4712) 2018-02-05 11:07:56 +01:00
errorfs.go all: Copy owner/group from parent (fixes #5445) (#5479) 2019-01-25 09:52:21 +01:00
fakefs_test.go all: Copy owner/group from parent (fixes #5445) (#5479) 2019-01-25 09:52:21 +01:00
fakefs.go all: Copy owner/group from parent (fixes #5445) (#5479) 2019-01-25 09:52:21 +01:00
fileinfo_unix.go all: Copy owner/group from parent (fixes #5445) (#5479) 2019-01-25 09:52:21 +01:00
fileinfo_windows.go all: Copy owner/group from parent (fixes #5445) (#5479) 2019-01-25 09:52:21 +01:00
filesystem_test.go lib/fs: Use os.FileMode.String for fs.FileMode (#5302) 2018-10-31 12:49:50 +01:00
filesystem.go all: Copy owner/group from parent (fixes #5445) (#5479) 2019-01-25 09:52:21 +01:00
folding_test.go all: Fix typos (#4772) 2018-02-24 08:51:29 +01:00
folding.go lib/fs: Add case insensitivity to MtimeFS 2017-11-17 12:10:16 +00:00
fsfileinfo_unix.go lib/fs: Handle deduplicated files on NTFS (fixes #1845) 2017-12-29 21:23:06 +00:00
fsfileinfo_windows.go all: Adjust windows perms in fs package (#5200) 2018-09-16 16:09:56 +02:00
logfs.go lib/fs: harmonize CreateSymlink definitions (fixes #4567) 2018-01-14 14:25:04 +00:00
lstat_broken.go lib/scanner: Use fs.Filesystem for all operations 2017-04-01 09:04:11 +00:00
lstat_regular.go lib/scanner: Use fs.Filesystem for all operations 2017-04-01 09:04:11 +00:00
mtimefs_test.go lib/fs: Add case insensitivity to MtimeFS 2017-11-17 12:10:16 +00:00
mtimefs.go lib/fs: Add case insensitivity to MtimeFS 2017-11-17 12:10:16 +00:00
tempname_test.go lib: Folder marker is now a folder 2017-09-02 05:52:38 +00:00
tempname.go lib/scanner: Fix UTF-8 normalization on ZFS (fixes #4649) 2018-01-05 18:11:09 +00:00
types.go lib/fs: Add fakefs (#5235) 2018-10-02 19:29:06 +01:00
util.go lib: Introduce fs.IsParent (fixes #5324) (#5326) 2018-11-22 11:16:45 +01:00
walkfs.go lib/scanner, lib/fs: Don't create file infos with abs paths (fixes #4799) (#4800) 2018-03-12 13:18:59 +01:00