S3Sync.net
February 02, 2014, 01:26:10 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: October 03, 2007, 12:52:26 PM
More on this.  I found out it is likely Cygwin's fault.  When copying files from S3 to Cygwin using s3sync, I get the following error:

Code:
Could not change owner/permissions on /path/to/file: Invalid argument - /path/to/file

I tried using chown directly... apparently, under Cygwin, it only likes user names, not user IDs.  At least, on my machine.

You can probably ignore this bug, unless someone knows a solution for Cygwin.
2  General Category / Closed Bugs / Re: Owner ID is incorrect on: October 03, 2007, 12:20:47 PM
I think I may have a clue about where it is coming from.

I observe this when I try to sync from S3 to an EC2 node, but so far only when syncing files that were originally put in S3 from my local machine running Cygwin.  So s3sync on Cygwin must somehow be getting weird owner IDs... that is, in order to reproduce this you may have to run it on Cygwin.  However, when I run "echo $UID" I get 400 as the answer.

The sequence as I remember it, is that I synced a directory from S3 to Cygwin, edited some files, and synced them back to S3 in a different path.  Then, I tried to sync from S3 to an EC2 node, and that is when I started observing this error.  The file that I edited is the one giving the problem.

However, when I looked at the files I originally synced from S3 to Cygwin, all of them have the bogus large user ID as the owner of the file.  Since only the ones I edited got synced back to S3, that is why only those got the bogus user ID.  Perhaps s3sync is failing in setting the proper ownership on the local drive in Cygwin, when first syncing from S3 to local?  Or perhaps the Cygwin version of chown is messed up?

Hope this helps...



3  General Category / Closed Bugs / Owner ID is incorrect on: October 03, 2007, 11:59:29 AM
I haven't had the time to trace this back to the source of the problem.  However, when running the following command:

Code:
s3sync -r bucket:path/to/dir/ /local/path/

I get the following error:

Code:
/usr/local/s3sync/s3sync.rb:659:in `chown': bignum too big to convert into `long' (RangeError)
        from /usr/local/s3sync/s3sync.rb:659:in `send'
        from /usr/local/s3sync/s3sync.rb:659:in `updateFrom'
        from /usr/local/s3sync/s3sync.rb:378:in `main'
        from /usr/local/s3sync/s3sync.rb:709

Now, I looked in s3sync.rb around line 659, and inserted the puts line in the code as shown below:

Code:
        # update permissions
        linkCommand = fromNode.symlink? ? 'l' : ''
        begin
          puts "chown #{fromNode.owner} #{fromNode.group} #{@path}"
          File.send(linkCommand + 'chown', fromNode.owner, fromNode.group, @path)
          File.send(linkCommand + 'chmod', fromNode.permissions, @path)
        rescue NotImplementedError
          # no one has lchmod, but who really cares
        rescue SystemCallError
          $stderr.puts "Could not change owner/permissions on #{@path}: #{$!}"
        end

The results of running the command again after cleaning out the local directory:

Code:
chown 400 401 /path/to/file1
chown 4294967295 401 /path/to/file2
/usr/local/s3sync/s3sync.rb:660:in `chown': bignum too big to convert into `long' (RangeError)
        from /usr/local/s3sync/s3sync.rb:660:in `send'
        from /usr/local/s3sync/s3sync.rb:660:in `updateFrom'
        from /usr/local/s3sync/s3sync.rb:378:in `main'
        from /usr/local/s3sync/s3sync.rb:710

Now, clearly, somewhere earlier in the code, fromNode.owner is getting assigned a bogus value.  I don't really have the time to trace this down, but could you look into it?  Thanks...
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!