changed logging of permissions to octal