atom feed9 messages in org.freebsd.freebsd-hackerstruncate tool - must be root?
FromSent OnAttachments
Eric AndersonMay 30, 2006 8:59 am 
David S. MadoleMay 30, 2006 9:11 am 
Maxim KonovalovMay 30, 2006 9:12 am 
Gergely CZUCZYMay 30, 2006 9:16 am 
Ruslan ErmilovMay 30, 2006 9:25 am 
Wesley ShieldsMay 30, 2006 9:27 am 
Eric AndersonMay 30, 2006 9:31 am 
Fabian KeilMay 30, 2006 9:31 am 
Eric AndersonMay 30, 2006 9:32 am 
Subject:truncate tool - must be root?
From:Ruslan Ermilov (ru@freebsd.org)
Date:May 30, 2006 9:25:29 am
List:org.freebsd.freebsd-hackers

On Tue, May 30, 2006 at 10:59:11AM -0500, Eric Anderson wrote:

Is it expected that truncate(8) must be used by a superuser? If so, then the man page should probably mention it. If not, then it's broken :)

If you speak about truncate(1), it works here under non-root:

$ uname -sr FreeBSD 7.0-CURRENT $ dd if=/dev/zero of=foo bs=64k count=10 10+0 records in 10+0 records out 655360 bytes transferred in 0.002590 secs (253040511 bytes/sec) $ id -u 1001 $ truncate -s 0 foo $ ls -l foo -rw------- 1 ru ru 0 May 30 19:21 foo $