S3Sync.net
February 02, 2014, 01:34:57 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / Closed Bugs / Re: Owner ID is incorrect on: April 25, 2008, 08:37:00 AM
I have a bunch of bash wrapper scripts which are common across various different OSes, which I run under Cygwin on windows. I could probably set it up differently, but should I need to? s3sync is generally nice and portable, and I think it makes sense to fix non-portability issues when they arise.

In any case, regardless of my reasons for using Cygwin, it is still perfectly reasonable (I think) to want file ownership information not to be duplicated across different machines where the user/group IDs may not be the same. This applies whether using MacOS, Linux, Windows, etc...
2  General Category / Closed Bugs / Re: Owner ID is incorrect on: April 25, 2008, 06:19:39 AM
I have been having this problem for a long time, and have finally got around to looking into it. By putting logging in various places I found that my S3 content has metadata headers (which I believe were inserted by s3sync) like this:

  x-amz-meta-group: 4294967295
  x-amz-meta-owner: 11110

So the 4294967295 value (0xFFFFFFFF) is stored in S3. When I do "ls -l" on these same files, I get things like:

  drwxr-xr-x+  4 sheltond ????????     0 Aug 13  2007 Foo/

so clearly the group isn't being understood as one of the ones that cygwin knows about. This is for files/directories created by Windows. Ones created under Cygwin are fine - they have a sensible group value. Adding some logging when uploading files shows that the "self.stat().gid" call is getting back 0xFFFFFFFF from the "stat.gid" field under Cygwin.

In any case, I tend to use s3sync for syncing data between my laptop (windows/cygwin), my home PC (linux), my media center (vista), etc. I don't want it to be setting the user and group of these files to the same values on all of those machines, as the user-ids aren't the same.

The way I have got around this is to add a "--no-set-owner" option, which just avoids doing that "chown" command. This seems to make everything work nicely again.

Anyway, I don't know if anyone else wants this feature, but I have attached a diff of the changes that I have made (the diff is based on version 1.2.4). In summary:

- Added --no-set-owner option
- Check for self.stat().gid being 0xFFFFFFFF and returning 0 in that case
- Added printing of directories being traversed if --verbose is on (I like to see how far through it is)

Feel free to take any or all of these changes.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!