[Bug 214665] security bug:using "truncate" bypass disk quotas limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=214665

Theodore Tso (tytso@xxxxxxx) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |tytso@xxxxxxx
         Resolution|---                         |INVALID

--- Comment #1 from Theodore Tso (tytso@xxxxxxx) ---
This is not a bug, but rather things working as expected.   This is because
truncate does not actually allocate any disk blocks.   It merely sets the
i_size of the inode to be the specified quantity.   If i_size is less than
where blocks currently are allocated and assigned to the inode at those logical
offsets, then those blocks will be deallocated.   But truncate never allocates
any additional data blocks.

Try running "du id", and see how much disk space the file takes.  Or try using
"ls -s", which will show the disk space used by the file --- which is different
from the size of the file.   If this puzzles you, look up the definition of
"sparse file".

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux