File that you're truncating should be opened for writing.
In reply to Re: Problem truncating a huge file by zwon in thread Problem truncating a huge file by abhishek_akj