Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 2006 19:25:16 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Eric Anderson <anderson@centtech.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: truncate tool - must be root?
Message-ID:  <20060530162516.GG60856@ip.net.ua>
In-Reply-To: <447C6BCF.50908@centtech.com>
References:  <447C6BCF.50908@centtech.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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
$ 

-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQFEfHHsqRfpzJluFF4RApA/AJ9isc26aculAt8SszIghCZXSGf01wCcCP9u
klycENr6NctOYGTkj5lx+pE=
=QRZs
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060530162516.GG60856>