Fix permission not being checked with "open: " command.