The following patch seems to work for restoring user id/group id
(ownership) data to files on linux. As far as I know it is only possible
to use uid/gid to restore file ownership using python. Change filenames or
cut and paste code as appropriate.
This makes linux full or partial file system recovery using sync command
workable.
- Jim
P.S. sorry if this is a duplicate. I forgot to confirm before sending the
first one.
--- s3cmd.orig 2012-06-05 15:44:52.000000000 -0400
+++ s3cmd 2012-06-05 14:28:09.000000000 -0400
@@ -755,6 +755,8 @@
atime = attrs.has_key('atime') and
int(attrs['atime']) or int(time.time())
os.utime(dst_file, (atime, mtime))
## FIXME: uid/gid / uname/gname handling comes here!
TODO
+ if attrs.has_key('uid') and attrs.has_key('gid'):
+ os.chown(dst_file, int(attrs['uid']),
int(attrs['gid']))
except OSError, e:
try: dst_stream.close()
except: pass
--
Jim Wilson, IT Manager
Kelco Industries
PO Box 160
Milbridge, ME 04658
j...@wreath.com
207-546-7989
http://www.kelcomaine.com
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
S3tools-general mailing list
S3tools-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s3tools-general