Skip to content

Conversation

agoeckner
Copy link
Contributor

Purpose

Platform data (ownership, xattrs, etc.) is now set correctly for newly-received folders, even if the received folder has the NoPermissions flag. This fixes #8399.

…y-received folders, even if the received folder has the NoPermissions flag.
@calmh
Copy link
Member

calmh commented May 1, 2023

Thanks, looks clean. Under what circumstances does one want to sync ownership and xattrs but not permissions?

Your note in the issue about copy ownership should not be related "copy ownership" is a different concept predating syncing ownership -- it means to take ownership from the parent directory at creation time.

@agoeckner
Copy link
Contributor Author

agoeckner commented May 1, 2023

The relevant scenario here is when syncing from a platform that does not support permissions (Synology in my case) to a platform on which I intend to use the copyOwnershipFromParent option. The ownership is copied from the parent directory in the setPlatformData function, which was not being run when the NoPermissions flag was set.

@agoeckner
Copy link
Contributor Author

This PR definitely should be merged. However, I should note that this PR does not close #8399, as I discovered another problem related to that issue.

@calmh
Copy link
Member

calmh commented May 2, 2023

Indeed; I had forgotten that the copy ownership happened in setPlatformData. 👍

@calmh calmh merged commit 7e31ec5 into syncthing:main May 2, 2023
calmh added a commit to calmh/syncthing that referenced this pull request May 3, 2023
* main:
  lib/model: Set platform data, incl. copying ownership, for new folders w/ NoPermissions flag (syncthing#8883)
  gui: Add Thai (th) translation template. (syncthing#8887)
  build: Produce nightly release builds
  gui, man, authors: Update docs, translations, and contributors
  build: Bump actions version; fix Node 12 deprecation warning (syncthing#8881)
  build: Build Debian packages
  build: Sign for upgrades
  build: Notarize mac builds
calmh added a commit to calmh/syncthing that referenced this pull request May 9, 2023
* main: (42 commits)
  all: Correct various typos (syncthing#8870)
  gui, man, authors: Update docs, translations, and contributors
  lib/model: Set platform data, incl. copying ownership, for new folders w/ NoPermissions flag (syncthing#8883)
  gui: Add Thai (th) translation template. (syncthing#8887)
  build: Produce nightly release builds
  gui, man, authors: Update docs, translations, and contributors
  build: Bump actions version; fix Node 12 deprecation warning (syncthing#8881)
  build: Build Debian packages
  build: Sign for upgrades
  build: Notarize mac builds
  build(deps): bump github.com/quic-go/quic-go from 0.33.0 to 0.34.0 (syncthing#8877)
  gui, man, authors: Update docs, translations, and contributors
  lib/ignore: Properly handle non-existing included ignore-files (fixes syncthing#8764) (syncthing#8874)
  lib/connections: Avoid using nil lanChecker
  gui, man, authors: Update docs, translations, and contributors
  lib/config, lib/connections: Configurable protocol priority (ref syncthing#8626) (syncthing#8868)
  build: Upgrade recli (fixes syncthing#8503) (syncthing#8871)
  build: Update dependencies (syncthing#8869)
  lib/model: Improve path generation for auto accepted folders (fixes syncthing#8859) (syncthing#8860)
  docs: fix typo (syncthing#8857)
  ...
@calmh calmh added this to the v1.23.5 milestone May 9, 2023
calmh pushed a commit that referenced this pull request May 17, 2023
… (#8907)

* Platform data (ownership, xattrs, etc.) is now set correctly for newly-received folders, even if the received folder has the NoPermissions flag.

* Call setPlatformData on receivers that have ignorePerms set to true.
calmh added a commit to calmh/syncthing that referenced this pull request Jun 4, 2023
* main:
  gui: Remove HTML support in tooltips
  cmd/syncthing: Use correct binary when restarting monitor (syncthing#8919)
  build(deps): bump github.com/minio/sha256-simd from 1.0.0 to 1.0.1 (syncthing#8916)
  build: Increase concurrency, add "basic checks" gatekeeper
  gui, man, authors: Update docs, translations, and contributors
  gui, man, authors: Update docs, translations, and contributors
  lib/model: Set platform data for new folders w/ ignorePerms (ref syncthing#8883) (syncthing#8907)
  gui, man, authors: Update docs, translations, and contributors
  lib: replace `Readdir(-1)` with `os.ReadDir` (syncthing#8901)
  lib/api: Allow BindDN to exclude any username formatting (fixes syncthing#8899) (syncthing#8900)
  build: Attempt cross compilation for ~all targets, allow it to fail
  lib/fs: Fix root path handling for Windows (fixes syncthing#8778)
  all: Grand test refactor (fixes syncthing#8779, fixes syncthing#8799)
  all: Correct various typos (syncthing#8870)
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label May 1, 2024
@syncthing syncthing locked and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy ownership feature not working with directories and files in it
3 participants