Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for preserving ownership and timestamps from files #15

Merged
merged 7 commits into from
Mar 11, 2024

Conversation

Ahuge
Copy link
Owner

@Ahuge Ahuge commented Mar 8, 2024

No description provided.

@Ahuge Ahuge force-pushed the ah/feature/preserve-flags branch from 82036ce to 9056373 Compare March 8, 2024 17:40
The `--preserve-timestamp` flag will set metadata on the s3 objects and
then update the files on disk during a download.

If the `--preserve-timestamp` flag is passed during an upload the following metadata keys will be set:
  - x-amz-meta-file-ctime
  - x-amz-meta-file-mtime
  - x-amz-meta-file-atime

If the `--preserve-timesamp` flag is passed during a download, s5cmd
will attempt to modify the created files on disk.
  **There doesn't appear to be a way to change the created date on Linux

** Note this has been rebased as of 2024/03/06
@Ahuge Ahuge force-pushed the ah/feature/preserve-flags branch from 9056373 to 3c8713d Compare March 8, 2024 17:46
@Ahuge
Copy link
Owner Author

Ahuge commented Mar 8, 2024

!Blocked until Dan's testing is completed.
!Blocked until we rebase and squash commits

The `--preserve-ownership` flag will query the user and group and store that in S3 as metadata.

On Windows this stores the SID, on linux this stores the uid/gid.

** Note this has been rebased as of 2024/03/06
We encountered an issue in testing where the new owner of the file had no permissions of any of the downloaded files.
It appears that this was due to the s5cmd process running as a SYSTEM service and executing --preserve-ownership to set the owner to "Ahuge".
These are zero length S3 objects with a name ending in a slash.

We record the metadata about ownership, timestamps about these folders
@Ahuge Ahuge force-pushed the ah/feature/preserve-flags branch from 3c8713d to 571b158 Compare March 11, 2024 15:30
@Ahuge Ahuge merged commit 09f4b59 into master Mar 11, 2024
7 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant