truncate before setting file permissions
define default file permissions