wrote chmod piece of filestate