Lesson of the Day: UID Mismatch

  • Sometimes you will get mismatch with UIDs. Many daemons are setup to not run with root. So a user is created. It is good security not to run things with root users. For PlexMediaServer they create the plex user. If you install, uninstall and then resinstall a plugin sometimes the old plex user is not deleted or you are using the same database shared folder. When you create a folder it holds the UID number of the owner. So say you have owner plex with UID XXX. Well you reinstalled and now plex user has UID yyy. What I am getting at is you sometimes need to look at UID of a user and then use stat command on shared folder. Check the UID of shared folder and make sure that it matches UID of the user you want to be owner of that folder. Owner may be plex but UID does not match current UID of plex user. So you have UID mistmatch. The UID on the plex user needs to match the ownship UID of the plex database folder, even though it may say plex is owner UID may not match. When a service will not start this is one of the top 3 things to check.


    D'oh!


    In the code boxes below you will see that the UID of plex is 115. If the database folder did not have correct UID for the plex user, as owner, you could fix the folder by updating ownerhsip information with plex's new UID by:


    chown -R plex:nogroup plexmediaserver (while in the plex directory one level up from the plexmediaserver folder)


    This is an example with plex but you can apply this type of solution to many services adjusting the variables.


    Zitat

    id -u plex
    115



    to find uid of a user:
    id -u username


    to find gid (primary group) of a user:
    id -g username


    to find all groups of a user:
    id -G username

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!