Koozali.org: home of the SME Server

Permissions not moved to new server

Offline alanh

  • 14
  • +0/-0
Permissions not moved to new server
« on: June 10, 2024, 03:18:54 AM »
I have an SME server 9 and backed up the config from 'Backup to desktop' - after moving users and ibays to a temp folder (got this process from a post a while ago on moving from sme 8 to 9)
using
'mv /home/e-smith/files/users /temp'  and same for ibays
then did the 'backup to desktop' to produce smeserver.tgz
then moved ibays and users back
'mv /temp/users /home/e-smith/files/' and same for ibays
then produce compressed files for users and ibays using
'tar -czvf /temp/users.tar.gz users' and same for ibays
copied these .gz files to my desktop
Install SME 10.1 to new disks
restore smeserver.tgz when asked
unpack .gz files using
cd /home/e-smith/files/
'tar -xvzf users.tar.gz'
and same for ibays

went in to run some programs to find out that permissions were not moved over for a lot of files, so for some .exe and .dll they were -rw-rw----, when on the old sme 9 server they were -rwxrw----,  so the execute permission is no there.

Just wondering what I may have done wrong here, when I moved from 8 to 9 it worked ok - my understanding is that tar would preserve the permissions, but it seems to not have.
Did some looking and found the -p flag in tar, but not much there, so also tried
'tar -p -xvzf users.tar.gz', but same problem
any help appreciated !
thank you




Offline ReetP

  • *
  • 3,805
  • +5/-0
Re: Permissions not moved to new server
« Reply #1 on: June 10, 2024, 12:25:46 PM »
Quote
when I moved from 8 to 9 it worked ok

Remember you are moving from 9 to 10 ;-)

You are using a hacky method that is liable to give unpredictable results.

Use the right tool for the job.

Either a full backup restore or:

https://wiki.koozali.org/Migratehelper

The permissions on the server are not necessarily what your client sees.

eg I have exe files on my server that are rw-rw-r-- but are executable on my desktop.

The ibay perms are set in the 'ibays' on the server-manager or db accounts on the cli - generally either Read/Write or Read, but not Exe.

I think they would only be executable on the server if you actually want them to run on the server (JP will clarify that one)

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Gary Douglas

  • *
  • 76
  • +1/-0
Re: Permissions not moved to new server
« Reply #2 on: June 10, 2024, 03:58:41 PM »

Offline ReetP

  • *
  • 3,805
  • +5/-0
Re: Permissions not moved to new server
« Reply #3 on: June 10, 2024, 04:21:30 PM »
anything to do with this?  https://bugs.koozali.org/show_bug.cgi?id=11555

Nice one - could well be (I don't any Windoze so.....)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline alanh

  • 14
  • +0/-0
Re: Permissions not moved to new server
« Reply #4 on: June 11, 2024, 08:02:11 AM »
Thanks everyone for the assistance with this. We have a simple server only setup , I'm not a big Linux expert by any means, and have learnt enough to get this all going so always looking for straightforward solutions, appreciate your help.

Offline ReetP

  • *
  • 3,805
  • +5/-0
Re: Permissions not moved to new server
« Reply #5 on: June 11, 2024, 11:39:33 AM »
Cool - please ask if you need further assistance.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Jean-Philippe Pialasse

  • *
  • 2,819
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Permissions not moved to new server
« Reply #6 on: June 17, 2024, 05:10:49 AM »
you should not move any file in place before the smeserver.tgz has been used to migrate user. 

even there only  user listed in accounts db will be migrated from old unix password files to new. 
note that manual moving of files and user not in accounts db (including some daemons users related to contribs might or will have different uid and gid.

copying file from one system to another will not keep username and groupename for the files but only uid and gid. 



the bug you point is not related.


as point John you can use migratehelper or you can use the exclude list to mot backup this content and just rsync it later.  (rsync sync using username from one system to another instead of uid by default)
« Last Edit: June 17, 2024, 05:14:54 AM by Jean-Philippe Pialasse »