facebook / wdt

Warp speed Data Transfer (WDT) is an embeddedable library (and command line tool) aiming to transfer data between 2 systems as fast as possible over multiple TCP paths.
https://www.facebook.com/WdtOpenSource
Other
2.86k stars 391 forks source link

File permission transfer #155

Closed dliang36 closed 7 years ago

dliang36 commented 7 years ago

Implementation and test for keeping file permission during transfer v0.1

Design decision:

  1. Get permission from the same st_mode that is used to get file size, and store permission in each metadata entry of DirectorySourceQueue, in order to avoid calling stat another time.
  2. Default permission is 512 (01000). When perm in WdtFileInfo is default, library behavior is not changed.

Test:

  1. Encode and decode in Protocol
  2. Print src and dst file permissions to file and compare in E2E

TODO:

  1. Shall we consider dir permission?
  2. What if blockDetails.allocationStatus == TO_BE_DELETED but receiver's file permission is owner only?
  3. What if sender side allows only owner's read?
  4. permission changed – only chmod the file. Don’t trans again
facebook-github-bot commented 7 years ago

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

facebook-github-bot commented 7 years ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes

uddipta commented 7 years ago

Regarding your questions, all of them are valid. But, let's try to resolve those one by one in separate diffs.

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes

facebook-github-bot commented 7 years ago

@uddipta has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes - changes since last import

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes - changes since last import

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes - changes since last import

facebook-github-bot commented 7 years ago

@uddipta has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes - changes since last import

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes - changes since last import

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes - changes since last import

facebook-github-bot commented 7 years ago

@dliang36 updated the pull request - view changes - changes since last import

facebook-github-bot commented 7 years ago

@uddipta has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.