Handle permissions

File permissions should be handled in the POSIX way.