moved seting datauser permissions to the end