Help Center/ ModelArts/ Troubleshooting/ DevEnviron/ Other Faults/ Permission Error When Starting a Notebook Instance as Root User
Updated on 2026-07-01 GMT+08:00

Permission Error When Starting a Notebook Instance as Root User

Symptom

If the user starts a notebook instance as the root user with a custom image where the root user's UID/GID is not set to 0, the container will adopt that UID at startup, causing permission issues.

Figure 1 Error message example

Possible Causes

  • The UID/GID of the root user is not 0.
    • Linux grants root permissions when the UID is 0. Changing this UID can disrupt critical system services like sudo, SSH, and package managers, corrupt file permissions, or permanently damage the system.
    • If the root user's UID in the image is not 0, Kubernetes' runAsUser=0 setting will not override it since the image's user configuration takes precedence over runAsUser.
  • The priority of the GID is lower than that of the UID.

    When the root user's UID in the image is 0 but its GID is not, the container uses the root user's GID from the image rather than the GID set during instance creation.

Solution

Ensure that the UID and GID of the root user is 0 (default value). Change the image of the notebook instance to solve this problem. For details, see Updating a Notebook Instance.