Tiny Core Base > TCB Bugs

TCL 8.x rootfs.gz files all owned by root:root

(1/4) > >>

MSumulong:
Somehow, all of the files in rootfs.gz of TCL 8.x are owned by root:root which I think should definitely not be the case.

@hiro has pointed this out earlier that I also discovered when using TCL 8.x's rootfs.gz.

--- Quote from: hiro on September 14, 2017, 06:00:10 PM ---after running "/usr/local/bin/cpio -i" on http://tinycorelinux.net/8.x/x86/release/distribution_files/rootfs.gz
many dirs are owned by root instead of staff.

--- End quote ---


There are a lot of directories that were once owned by root:staff (uid=0:gid=50) are now just root:root. Comparing the previous 7.x version of rootfs.gz shows that there are files that are owned by root:staff such as /opt:


--- Code: ---drwxrwsr-x   2 0        50              0 Jul  4  2016 opt
-rw-rw-r--   1 0        50             31 Jul  4  2016 opt/tcemirror
-rwxrwxr-x   1 0        50             51 Jul  4  2016 opt/bootlocal.sh
-rw-rw-r--   1 0        50              9 Jul  4  2016 opt/.filetool.lst
-rwxrwxr-x   1 0        50            613 Jul  4  2016 opt/shutdown.sh
-rw-rw-r--   1 0        50            145 Jul  4  2016 opt/.xfiletool.lst
-rwxrwxr-x   1 0        50            272 Jul  4  2016 opt/bootsync.sh

--- End code ---

Looking at /opt in TCL 8.x's rootfs.gz shows the files changed to gid=50:


--- Code: ---drwxrwsr-x   2 0        0               0 Sep 21 12:16 opt
-rwxrwxr-x   1 0        0             272 Sep 21 12:16 opt/bootsync.sh
-rw-rw-r--   1 0        0             145 Sep 21 12:16 opt/.xfiletool.lst
-rwxrwxr-x   1 0        0             613 Sep 21 12:16 opt/shutdown.sh
-rw-rw-r--   1 0        0               9 Sep 21 12:16 opt/.filetool.lst
-rwxrwxr-x   1 0        0              51 Sep 21 12:16 opt/bootlocal.sh
-rw-rw-r--   1 0        0              31 Sep 21 12:16 opt/tcemirror

--- End code ---
I've attached the full file listing of both TCL 8.x and 7.x's rootfs.gz.


rootfs.gz downloaded from the following links:
http://tinycorelinux.net/8.x/x86/release/distribution_files/rootfs.gz
http://tinycorelinux.net/7.x/x86/release/distribution_files/rootfs.gz

Used the following command to get the file listings:

--- Code: ---gzip -dc rootfs.gz | cpio -tvn > cpio-listing

--- End code ---

polikuo:
Here's a quick script to find out the differences:
save this script as "chk_permissions"

--- Code: ---#!/bin/sh
OLD=$1
NEW=$2
save_diff_as() {
ls -Ral | awk '{
if (/\->/)
print $1,$3,$4,($(NF-2))
else
print $1,$3,$4,$NF
}' > $1
}
cd $OLD || exit 1
save_diff_as /tmp/${OLD}.lst
cd - || exit 1
cd $NEW || exit 1
save_diff_as /tmp/${NEW}.lst
cd - || exit 1
diff -u /tmp/${OLD}.lst /tmp/${NEW}.lst | tee /tmp/ownership.diff

--- End code ---

FYI
I extracted "rootfs-7.gz" to /tmp/7, "rootfs-8.gz" to /tmp/8
Run "chk_ownership /tmp/7 /tmp/8"

Juanito:
I'm away this week, I'll have a look as soon as I get back .

Juanito:
How are you extracting the files from rootfs{,64}.gz?

Using Corepure64 8.2:
--- Code: ---$ cd /tmp/extract
$ zcat /tmp/rootfs64.gz | sudo cpio -i -H newc -d
$ ls -l opt
total 16
-rwxrwxr-x    1 root     staff           51 Sep 28 21:11 bootlocal.sh
-rwxrwxr-x    1 root     staff          272 Sep 28 21:11 bootsync.sh
-rwxrwxr-x    1 root     staff          613 Sep 28 21:11 shutdown.sh
-rw-rw-r--    1 root     staff           31 Sep 28 21:11 tcemirror

--- End code ---

..and:
--- Code: ---$ ls -l
total 4
drwxr-xr-x    2 root     root          1380 Sep 28 21:11 bin/
drwxrwxr-x    7 root     staff         2540 Sep 28 21:11 dev/
drwxr-xr-x    8 root     root           660 Sep 28 21:11 etc/
drwxrwxr-x    2 root     staff           40 Sep 28 21:11 home/
-rwxr-xr-x    1 root     root           496 Sep 28 21:11 init
drwxr-xr-x    4 root     root           840 Sep 28 21:11 lib/
lrwxrwxrwx    1 root     root            11 Sep 28 21:11 linuxrc -> bin/busybox
drwxrwxr-x    2 root     staff           40 Sep 28 21:11 mnt/
drwxrwsr-x    2 root     staff          160 Sep 28 21:11 opt/
drwxrwxr-x    2 root     staff           40 Sep 28 21:11 proc/
drwxrwxr-x    2 root     staff           80 Sep 28 21:11 root/
drwxrwxr-x    3 root     staff           60 Sep 28 21:11 run/
drwxr-xr-x    2 root     root          1200 Sep 28 21:11 sbin/
drwxrwxr-x    2 root     staff           40 Sep 28 21:11 sys/
drwxrwxrwt    2 root     staff           80 Sep 28 21:11 tmp/
drwxr-xr-x    7 root     root           140 Sep 28 21:11 usr/
drwxrwxr-x    8 root     staff          180 Sep 28 21:11 var/
--- End code ---

MSumulong:
I wasn't extracting the files, I was just using cpio -tvn to get a file listing of what's inside the archive.

However, I was able to confirm getting the same results as you did with rootfs64.gz but not with rootfs.gz (the x86 version). Using Tiny Core Linux 8.2 x86 rootfs.gz and the same commands you used for Corepure 64 8.2, I get the following results:


--- Code: ---$ wget http://distro.ibiblio.org/tinycorelinux/8.x/x86/release/distribution_files/rootfs.gz
--2017-09-28 13:38:35--  http://distro.ibiblio.org/tinycorelinux/8.x/x86/release/distribution_files/rootfs.gz
Resolving distro.ibiblio.org (distro.ibiblio.org)... 152.19.134.43
Connecting to distro.ibiblio.org (distro.ibiblio.org)|152.19.134.43|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2526169 (2.4M) [application/x-gzip]
Saving to: ‘rootfs.gz’

rootfs.gz                                  100%[======================================================================================>]   2.41M   103KB/s    in 28s     

2017-09-28 13:39:04 (89.1 KB/s) - ‘rootfs.gz’ saved [2526169/2526169]

$ zcat rootfs.gz | sudo cpio -i -H newc -d
$ ls -l opt
total 48
-rwxrwxr-x 1 root root  51 Sep 28 13:41 bootlocal.sh
-rwxrwxr-x 1 root root 272 Sep 28 13:41 bootsync.sh
-rwxrwxr-x 1 root root 613 Sep 28 13:41 shutdown.sh
-rw-rw-r-- 1 root root  31 Sep 28 13:41 tcemirror

--- End code ---

and also:


--- Code: ---drwxr-xr-x 2 root root   12288 Sep 28 13:41 bin
drwxrwxr-x 7 root root   20480 Sep 28 13:41 dev
drwxr-xr-x 8 root root    4096 Sep 28 13:41 etc
drwxrwxr-x 2 root root    4096 Sep 28 13:41 home
-rwxr-xr-x 1 root root     496 Sep 28 13:41 init
drwxr-xr-x 4 root root    4096 Sep 28 13:41 lib
lrwxrwxrwx 1 root root      11 Sep 28 13:41 linuxrc -> bin/busybox
drwxrwxr-x 2 root root    4096 Sep 28 13:41 mnt
drwxrwsr-x 2 root root    4096 Sep 28 13:41 opt
drwxrwxr-x 2 root root    4096 Sep 28 13:41 proc
drwxrwxr-x 2 root root    4096 Sep 28 13:41 root
drwxrwxr-x 3 root root    4096 Sep 28 13:41 run
drwxr-xr-x 2 root root   12288 Sep 28 13:41 sbin
drwxrwxr-x 2 root root    4096 Sep 28 13:41 sys
drwxrwxrwt 2 root root    4096 Sep 28 13:41 tmp
drwxr-xr-x 7 root root    4096 Sep 28 13:41 usr
drwxrwxr-x 8 root root    4096 Sep 28 13:41 var

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version