truncate tool - must be root?

Wesley Shields wxs at atarininja.org
Tue May 30 09:27:13 PDT 2006


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 :)
> 
> 
> Eric

I can use truncate on files I own without a problem.  Who owns the
files?  A quick experiment indicates that even setting a file to mode
647 when owned by root:wheel doesn't allow it to be operated on by
anyone other than root when using truncate.

-- WXS


More information about the freebsd-hackers mailing list