Thanks, Rich. For the time being I'm using a similar workaround: A startup script that changes permissions of the affected directories back to me.
I think this is a bug in BusyBox tar.
Here is proof that the directories files inside the tarball have bruno:staff permissions, which is what I want:
$ tar -tvf ./mydata.tgz
-rwxr-xr-x bruno/staff 53 2020-03-11 09:56:10 home/bruno/.local/share/applications/mimeapps.list
-rwxr-xr-x bruno/staff 396 2020-03-11 10:41:52 home/bruno/.X.d/startup-applications.sh
Now let's see what happens with the permissions when the tarball is extracted with sudo:
bruno@box:~/Downloads$ mkdir test
bruno@box:~/Downloads$ cd test
bruno@box:~/Downloads/test$ sudo tar -xvf /mnt/sda3/tce/mydata.tgz
...
bruno@box:~/Downloads/test$ ls -ld home/bruno/.X.d
drwxr-xr-x 2 root root 4096 Mar 11 15:14 home/bruno/.X.d/
As you can see, extraction with sudo tar converts ownership of the directory to root.
The behavior I'm observing is what you'd expect if I were using the -o option, which I'm not:
bruno@box:~$ tar --help
BusyBox v1.31.1 (2019-12-16 14:38:11 UTC) multi-call binary.
Usage: tar c|x|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [--exclude PATTERN]... [FILE]...
Create, extract, or list files from a tar file
c Create
x Extract
t List
-f FILE Name of TARFILE ('-' for stdin/out)
-C DIR Change to DIR before operation
-v Verbose
-O Extract to stdout
-m Don't restore mtime
-o Don't restore user:group
-k Don't replace existing files
-Z (De)compress using compress
-z (De)compress using gzip
-J (De)compress using xz
-j (De)compress using bzip2
-a (De)compress using lzma
-h Follow symlinks
-T FILE File with names to include
-X FILE File with glob patterns to exclude
--exclude PATTERN Glob pattern to exclude
Oh, well. I don't want to fight what seems to be a bug in BusyBox. I thought filetool.sh was doing something unexpected, but the fault clearly lies with BusyBox tar and not with filetool.sh.