fixed bugs on command syntax matching rules.
set the each command's permissions