chmod of directories to enable writing of tmp file