New version with user, group and mode support