Why is sudo insufficient when running bsdtar?

Ask questions about Arch Linux ARM. Please search before making a new topic.

Why is sudo insufficient when running bsdtar?

Postby 1ZRfPNdkrrRI » Fri Apr 10, 2020 6:28 pm

First, sorry for my username, I was having trouble getting the forum user creation page to cooperate (it kept saying one of more field was marked as spam, but wouldn't tell me which one, so I was changing names and emails until it worked).

In the instructions for creating a boot image (for Generic AArch64, but I assume the same advice is given for all platforms) we're told to run bsdtar as root, and not to use sudo, to preserve the extended file attributes. But looking at the bsdtar man page and source from libarchive-3.4.2 it seems that bsdtar just cares about the value returned by geteuid, which is 0 in either the sudo or run as root case. It uses that value to enable the preservation of extended attributes and ACLs by default when called for extraction.

So my question is, have I missed something that makes running with sudo insufficient?

Was that warning perhaps added at a time when bsdtar somehow cared about the distinction between running as root and sudo? The warning always trips me up, and I'd love to put my curiosity to rest.

Thanks,
Anton
1ZRfPNdkrrRI
 
Posts: 1
Joined: Fri Apr 10, 2020 6:14 pm

Return to User Questions

Who is online

Users browsing this forum: No registered users and 35 guests