• Ownership problems when setting up Mageia 9

    From Grimble@2:250/1 to All on Thu Sep 7 12:46:30 2023
    I'm in the process of transferring various applications having done a
    fresh install of Mageia 9. All my postgres stuff is in /local/pgsql, to provide easy upgrading (didn't like putting it in /var).
    Having failed to start postgresql in Mageia 9, I reverted to Mageia 8
    and found that ownership of the posgres stuff had been changed behind my
    back:
    [root@bach pgsql]# ls -l
    total 4
    drwx------ 19 avahi-autoipd avahi-autoipd 4096 Sep 4 15:40 data/

    Why should avahi do this?
    --
    Grimble
    Registered Linux User #450547
    Machine 'Bach' running Plasma on 5.15.126-desktop-1.mga8 kernel.
    Mageia release 8 (Official) for x86_64

    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Sep 7 14:31:00 2023
    On 2023-09-07, Grimble <grimble@nomail.afraid.org> wrote:
    I'm in the process of transferring various applications having done a
    fresh install of Mageia 9. All my postgres stuff is in /local/pgsql, to provide easy upgrading (didn't like putting it in /var).
    Having failed to start postgresql in Mageia 9, I reverted to Mageia 8
    and found that ownership of the posgres stuff had been changed behind my back:
    [root@bach pgsql]# ls -l
    total 4
    drwx------ 19 avahi-autoipd avahi-autoipd 4096 Sep 4 15:40 data/

    Why should avahi do this?

    I suspect it has nothing to do with avahi.
    On a fresh install, the uid and gid for all of the system programs could
    well have changed. Instead of looking at the username and group name
    look at gid and uid instead. And look in /etc/passwd. I suspect you will
    find that the old uid of postfix is now the uid of avahi-autoipd.
    On a fresh install, Mageia has no idea of what the uids(that number
    after the name in /etc/passwd) were for for various sevices (uids less
    than 1000) and it assigns them "randomly" (well in order from 999 down
    as it comes to installing them.) There is no reason that that ordering
    should be the same on two separate installs. This is a severe problem
    with fresh installs, rather than updates.
    The ownership (as determined by uid) has not changed, but the link
    between ownership and owner's name has changed.
    Now, usually for system stuff, it is installed anew, so the old uid does
    not matter. But if the old program put stuff into new directories (ie
    not made during installation) then those directories and files will
    carry the old uid.

    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Grimble@2:250/1 to All on Fri Sep 8 16:19:46 2023
    On 07/09/2023 14:31, William Unruh wrote:
    On 2023-09-07, Grimble <grimble@nomail.afraid.org> wrote:
    I'm in the process of transferring various applications having done a
    fresh install of Mageia 9. All my postgres stuff is in /local/pgsql, to
    provide easy upgrading (didn't like putting it in /var).
    Having failed to start postgresql in Mageia 9, I reverted to Mageia 8
    and found that ownership of the posgres stuff had been changed behind my
    back:
    [root@bach pgsql]# ls -l
    total 4
    drwx------ 19 avahi-autoipd avahi-autoipd 4096 Sep 4 15:40 data/

    Why should avahi do this?

    I suspect it has nothing to do with avahi.
    On a fresh install, the uid and gid for all of the system programs could
    well have changed. Instead of looking at the username and group name
    look at gid and uid instead. And look in /etc/passwd. I suspect you will
    find that the old uid of postfix is now the uid of avahi-autoipd.
    On a fresh install, Mageia has no idea of what the uids(that number
    after the name in /etc/passwd) were for for various sevices (uids less
    than 1000) and it assigns them "randomly" (well in order from 999 down
    as it comes to installing them.) There is no reason that that ordering
    should be the same on two separate installs. This is a severe problem
    with fresh installs, rather than updates.
    The ownership (as determined by uid) has not changed, but the link
    between ownership and owner's name has changed.
    Now, usually for system stuff, it is installed anew, so the old uid does
    not matter. But if the old program put stuff into new directories (ie
    not made during installation) then those directories and files will
    carry the old uid.


    Thanks for that, William; clearly explained and easily fixed.
    --
    Grimble
    Machine 'Haydn' running Plasma 5.20.4 on 5.15.126-desktop-1.mga8 kernel.
    Mageia release 8 (Official) for x86_64


    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)