Thread: Patch for 's' file attribute in ext4 filesystem?
the manpage 'chattr' command includes following:... seems pretty slick, in aforementioned "bugs , limitations" section, says this:when file 's' attribute set deleted, blocks zeroed , written disk. note: please make sure read bugs , limitations section @ end of document.this attribute isn't supported in ext4 either (see below). seems incredibly convenient way securely overwrite files - know of patch allow this? little light google-ing didn't turn up...the 'c', 's', , 'u' attributes not honored ext2 , ext3 filesystems implemented in current mainline linux kernels. these attributes may implemented in future versions of ext2 , ext3 filesystems.
attribute not working: (and shred working expected)
code:root@linux:/# mount /dev/sdb1 /mnt root@linux:/# echo "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj" > /mnt/thing.txt root@linux:/# umount /mnt root@linux:/# hexdump -c /dev/sdb1 | grep "jjjjjjjjjjjjjjjj" 00840c00 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a |jjjjjjjjjjjjjjjj| root@linux:/# mount /dev/sdb1 /mnt root@linux:/# rm -rf /mnt/thing.txt root@linux:/# umount /mnt root@linux:/# hexdump -c /dev/sdb1 | grep "jjjjjjjjjjjjjjjj" 00840c00 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a |jjjjjjjjjjjjjjjj| root@linux:/# mount /dev/sdb1 /mnt root@linux:/# echo "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" > /mnt/thing2.txt root@linux:/# chattr +s /mnt/thing2.txt root@linux:/# umount /mnt root@linux:/# hexdump -c /dev/sdb1 | grep "kkkkkkkkkkkkkkkk" 00840c00 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b |kkkkkkkkkkkkkkkk| root@linux:/# mount /dev/sdb1 /mnt root@linux:/# lsattr /mnt s----------------e- /mnt/thing2.txt root@linux:/# rm -rf /mnt/thing2.txt root@linux:/# umount /mnt root@linux:/# hexdump -c /dev/sdb1 | grep "kkkkkkkkkkkkkkkk" 00840c00 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b 4b |kkkkkkkkkkkkkkkk| root@linux:/# mount /dev/sdb1 /mnt root@linux:/# shred /mnt/thing2.txt root@linux:/# umount /mnt root@linux:/# hexdump -c /dev/sdb1 | grep "kkkkkkkkkkkkkkkk" root@linux:/# exit
Forum The Ubuntu Forum Community Ubuntu Specialised Support Security [all variants] Patch for 's' file attribute in ext4 filesystem?
Ubuntu
Comments
Post a Comment