urjaman
"I Know. We're going for a ride."
Testcase:
EDIT2: Notes on above.
1. I dont have the rights to directly load the squashfs module. This would also propably be the case with your php/webserver privileges.
2. I can still easily use mksquashfs to create a test sqfs file.
3. I can also list the contents of that file easily with unsquashfs.
4. The kernel has not autoloaded the squashfs module when I did these tests.
EDIT: Additionally:
squashfs-tools contains mksquashfs and unsquashfs. In my case the squashfs kernel module is owned by the kernel package. It could also be in a squashfs-modules package (or something like that) depending on the distribution.
Code:
[urjaman@phenom ~]$ modprobe squashfs
FATAL: Error inserting squashfs (/lib/modules/2.6.35-ARCH/kernel/fs/squashfs/squashfs.ko): Operation not permitted
[urjaman@phenom ~]$ ls testdir
file_a file_b file_c
[urjaman@phenom ~]$ mksquashfs testdir test.sqfs
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on test.sqfs, block size 131072.
Exportable Squashfs 4.0 filesystem, data block size 131072
compressed data, compressed metadata, compressed fragments
duplicates are removed
Filesystem size 0.23 Kbytes (0.00 Mbytes)
82.17% of uncompressed filesystem size (0.28 Kbytes)
Inode table size 55 bytes (0.05 Kbytes)
42.31% of uncompressed inode table size (130 bytes)
Directory table size 39 bytes (0.04 Kbytes)
69.64% of uncompressed directory table size (56 bytes)
Number of duplicate files found 3
Number of inodes 4
Number of files 3
Number of fragments 0
Number of symbolic links 0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 1
Number of ids (unique uids + gids) 2
Number of uids 1
urjaman (501)
Number of gids 1
users (100)
[urjaman@phenom ~]$ unsquashfs -l test.sqfs
Parallel unsquashfs: Using 4 processors
3 inodes (0 blocks) to write
squashfs-root
squashfs-root/file_a
squashfs-root/file_b
squashfs-root/file_c
[urjaman@phenom ~]$ lsmod | grep squashfs
[urjaman@phenom ~]$ cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev cgroup
nodev cpuset
nodev tmpfs
nodev devtmpfs
nodev binfmt_misc
nodev debugfs
nodev securityfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev devpts
nodev ramfs
nodev mqueue
ext3
nodev usbfs
ext2
nodev fuse
fuseblk
nodev fusectl
1. I dont have the rights to directly load the squashfs module. This would also propably be the case with your php/webserver privileges.
2. I can still easily use mksquashfs to create a test sqfs file.
3. I can also list the contents of that file easily with unsquashfs.
4. The kernel has not autoloaded the squashfs module when I did these tests.
EDIT: Additionally:
Code:
[urjaman@phenom ~]$ pacman -Ql squashfs-tools
squashfs-tools /sbin/
squashfs-tools /sbin/mksquashfs
squashfs-tools /sbin/unsquashfs
[urjaman@phenom ~]$ pacman -Qo /lib/modules/2.6.35-ARCH/kernel/fs/squashfs/squashfs.ko
/lib/modules/2.6.35-ARCH/kernel/fs/squashfs/squashfs.ko is owned by kernel26 2.6.35.4-1
squashfs-tools contains mksquashfs and unsquashfs. In my case the squashfs kernel module is owned by the kernel package. It could also be in a squashfs-modules package (or something like that) depending on the distribution.