Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35809 > unrolled thread
| Started by | Nicholas Cole <nicholas.cole@gmail.com> |
|---|---|
| First post | 2012-12-30 18:57 +0000 |
| Last post | 2012-12-30 22:24 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
Tarfile and usernames Nicholas Cole <nicholas.cole@gmail.com> - 2012-12-30 18:57 +0000
Re: Tarfile and usernames Hans Mulder <hansmu@xs4all.nl> - 2012-12-30 22:24 +0100
| From | Nicholas Cole <nicholas.cole@gmail.com> |
|---|---|
| Date | 2012-12-30 18:57 +0000 |
| Subject | Tarfile and usernames |
| Message-ID | <mailman.1469.1356893859.29569.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
Dear List, I'm hoping to use the tarfile module in the standard library to move some files between computers. I can't see documented anywhere what this library does with userids and groupids. I can't guarantee that the computers involved will have the same users and groups, and would like the archives to be extracted so that the files are all owned by the extracting user. Essentially, I do *not* with to preserve the owner and groups specified in the archives. What is the right way to achieve this? Best wishes, Nicholas
[toc] | [next] | [standalone]
| From | Hans Mulder <hansmu@xs4all.nl> |
|---|---|
| Date | 2012-12-30 22:24 +0100 |
| Message-ID | <50e0b0f6$0$6944$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #35809 |
On 30/12/12 19:57:31, Nicholas Cole wrote: > Dear List, > > I'm hoping to use the tarfile module in the standard library to move > some files between computers. > > I can't see documented anywhere what this library does with userids and > groupids. I can't guarantee that the computers involved will have the > same users and groups, and would like the archives to be extracted so > that the files are all owned by the extracting user. > > Essentially, I do *not* with to preserve the owner and groups specified > in the archives. > > What is the right way to achieve this? I would agree that this ought to be documented. From reading the code: the way to achieve this, is to run as a user other than root. Or monkeypatch the TarFile.chown method to be a no-op. Hope this helps, -- HansM
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web