File permissions after migration from vz 3.0 -> 4.7

Discussion in 'General Discussion' started by MiZi, Jan 29, 2016.

  1. MiZi

    MiZi Kilo Poster

    Messages:
    10
    Hi all,
    we have some old virtuozzo 3.0 (virtuozzo-release-3.0.0-177) HW nodes and migration to new one with version 4.7 (virtuozzo-release-4.7.0-575)is needed. Let me describe my procedure: (I don't wat to upgrade old node to vz4 and after vz4.7 as described on http://kb.odin.com/en/112334 due a lot of customers)
    1. sync templates by command
      rsync -auHv /vz/template/centos/5/x86/ root@XX.XX.XX.XX:/vz/template/centos/5/x86/
    2. offline migration
      vzmigrate -r no --keep-dst XX.XX.XX.XX VEID
    3. conversion from vz3 > vz4
      vzctl convert VEID
    Procedure finished without problems. Managing VPSs from PVA is without problems (stop, start, set params, upgrade, install package....). I got only one big problem: special permissions like setuid, setgid, sticky bit are missing or completly wrong (/tmp have 755 instead 4777).

    For example file /usr/bin/passwd:

    synced templates are identical
    /vz/template/centos/5/x86/passwd-0.73-1.i386/usr/bin/passwd has right permissions (source and target node)
    Code:
    File: `/vz/template/centos/5/x86/passwd-0.73-1.i386/usr/bin/passwd'
    Size: 19904 Blocks: 42 IO Block: 4096 regular file
    Device: 802h/2050d Inode: 12394527 Links: 1
    Access: (4755/-rwsr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
    but permissions links on VE private area is different (I don't know exactly, if it is iportant for problem)
    source:
    Code:
    File: `/vz/private/767000.migrated/root/usr/bin/passwd' -> `////centos/5/x86/passwd-0.73-1.i386/usr/bin/passwd'
    Size: 50 Blocks: 0 IO Block: 4096 symbolic link
    Device: 802h/2050d Inode: 24740335 Links: 1
    Access: (4755/lrwsr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
    target:
    Code:
    File: „/vz/private/767000/fs/root/usr/bin/passwd“ -> „////centos/5/x86/passwd-0.73-1.i386/usr/bin/passwd“
    Size: 50 Blocks: 0 IO Block: 4096 symbolický odkaz
    Device: 802h/2050d Inode: 20980017 Links: 1
    Access: (0755/lrwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
    I found article about problem with socket permissions http://kb.odin.com/en/124466 - may be my problem is similar?
    ____
    Solution?
    Is not a problem create map files with special permissions from source VE and apply to migrated VE. But "system" solution may be better :)
    Sorry for my english and thanks for tips (if exist)
     
  2. Pavel

    Pavel A.I. Auto-Responder Odin Team

    Messages:
    432
    Hello,

    Unfortunately rsync is known to make suid/sgid and sticky bits to disappear. Probably updating rsync would help you, but I cannot guarantee that.
    I'd recommend to use "tar" with --preserve in order to keep everything intact - it's more reliable.
     

Share This Page