this post was submitted on 16 Sep 2025
129 points (97.8% liked)

Linux

58795 readers
497 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

That was a "fun" debugging session...

you are viewing a single comment's thread
view the rest of the comments
[–] IsoKiero@sopuli.xyz 19 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

Since no one has yet mentioned, by default if you're running tar as a non-root user it extracts files with owner/umask of the current user and if you run it as root (or superuser) it'll preserve ownership and permissions. From tar man page:

--no-same-owner

Extract files as yourself (default for ordinary users).

--no-same-permissions

Apply the user's umask when extracting permissions from the archive (default for ordinary users).

As mentioned, with root the defaults are to keep UID/permissions as they are in the archive. (--preserve-permissions and --same-owner).

[–] TheMadBeagle@lemmy.ml 4 points 3 weeks ago

Really good callout! Thanks for adding that