adjusted sorting method, function to give all group users write access to files