Introduced dynamic calculation of uid and gid