# Off topic ... but I just need to extract a tar.gz file and keep owner & group?

**URL:** <https://discourse.nodered.org/t/off-topic-but-i-just-need-to-extract-a-tar-gz-file-and-keep-owner-group/86832>\
**Category:** General\
**Created:** [28 March 2024 14:56 UTC](https://discourse.nodered.org/t/off-topic-but-i-just-need-to-extract-a-tar-gz-file-and-keep-owner-group/86832 "2024-03-28T14:56:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![questuk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/questuk/32/4059_2.png) [@questuk](https://discourse.nodered.org/u/questuk)\
**Post date:** [28 March 2024 14:56 UTC](https://discourse.nodered.org/t/off-topic-but-i-just-need-to-extract-a-tar-gz-file-and-keep-owner-group/86832/1 "2024-03-28T14:56:05Z")

</div>

Hi,

I apologise for this being off topic, but I have tried all day and some of yesterday, to extract with correct owner and group and failed.

I have a host pc ( where the tar file comes from ) and a remote PC, on both I am user **gb**  
As you can see from the image, it has 1 folder on the host PC, with owner of 5050 and group root. This I need to retain !

 ![03](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/7/671569731b3db3c785cb9f1e803ccac9ca1436fb.png)

If i extract the tar file, it loses the user & group and becomes **gb**  
 ![04](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/dbea75e1786d8e93b220d714bde7a9cb0ea0ccee.png)

I have tried various methods to copy this, from my host PC to remote including **ssh rsync scp,** I am totally lost now, of how to retain the owner and group ? 🙄

I know that most of you are far far more knowledgeable than me, so hopefully it is an easy fix ?

Thanks

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [28 March 2024 15:17 UTC](https://discourse.nodered.org/t/off-topic-but-i-just-need-to-extract-a-tar-gz-file-and-keep-owner-group/86832/2 "2024-03-28T15:17:01Z")

</div>

Hi, If you want all files to be in the root group after unzipping, you must give the correct group to each file before zipping.

---

<div class="post-metadata">

**Author:** ![questuk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/questuk/32/4059_2.png) [@questuk](https://discourse.nodered.org/u/questuk)\
**Post date:** [28 March 2024 15:32 UTC](https://discourse.nodered.org/t/off-topic-but-i-just-need-to-extract-a-tar-gz-file-and-keep-owner-group/86832/3 "2024-03-28T15:32:00Z")

</div>

Hi,

All I know is if the files do not have the exact number and group, pgAdmin4 will not run.

**pgAdmin4** is run from inside **docker** and it was originally on another PC, so that is where the unusual numbers come from. 🤔

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 June 2024 15:32 UTC](https://discourse.nodered.org/t/off-topic-but-i-just-need-to-extract-a-tar-gz-file-and-keep-owner-group/86832/4 "2024-06-26T15:32:22Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
