Which directories were copied over? Do you still have the originals files on the original partition?
If so, you could run:
find <dir>/ -printf "chown %u:%g %p && chmod %m %p\n" >fixperms.sh
in the base of the old partition, inspect it and if OK, move it to the base of the new partition and run it.
You may want to include only the directories you need, such as "find /bin /sbin /usr /lib /var ..." to skip /mnt/, /dev & /tmp.
Be sure to inspect the scripts to see that they look right.
This may give you an idea:
Code:
find Documents/ -printf "chown %u:%g %p && chmod %m %p\n" | head -n 10
chown jschiwal:jschiwal Documents/ && chmod 755 Documents/
chown jschiwal:jschiwal Documents/pewx.srt && chmod 644 Documents/pewx.srt
chown jschiwal:jschiwal Documents/crankygeeks.121.ogg && chmod 644 Documents/crankygeeks.121.ogg
chown jschiwal:jschiwal Documents/gbtv-n95-128176-10-9-2008.mp4 && chmod 644 Documents/gbtv-n95-128176-10-9-2008.mp4
chown jschiwal:jschiwal Documents/VLC - Features.war && chmod 644 Documents/VLC - Features.war
chown jschiwal:jschiwal Documents/Chapter 6. Containers.war && chmod 644 Documents/Chapter 6. Containers.war
chown root:root Documents/multiboot.pdf && chmod 644 Documents/multiboot.pdf
chown jschiwal:jschiwal Documents/PSerrata.txt && chmod 644 Documents/PSerrata.txt
You should put your disto and version in your user profile on this site. If you use an rpm based disto, you can use "rpm -qVa" to validate the packages. A debian based system my have a similar command to validate debian packages.
Code:
rpm -qlv gvim
-rw-r--r-- 1 root root 6048 Jun 6 21:23 /etc/gvimrc
lrwxrwxrwx 1 root root 4 Jun 6 21:23 /usr/bin/egview -> gvim
lrwxrwxrwx 1 root root 4 Jun 6 21:23 /usr/bin/egvim -> gvim
lrwxrwxrwx 1 root root 4 Jun 6 21:23 /usr/bin/eview -> gvim
lrwxrwxrwx 1 root root 4 Jun 6 21:23 /usr/bin/evim -> gvim
lrwxrwxrwx 1 root root 4 Jun 6 21:23 /usr/bin/gex -> gvim
lrwxrwxrwx 1 root root 4 Jun 6 21:23 /usr/bin/gvi -> gvim
lrwxrwxrwx 1 root root 4 Jun 6 21:23 /usr/bin/gview -> gvim
lrwxrwxrwx 1 root root 3 Jun 6 21:23 /usr/bin/gvim -> vim
-rwxr-xr-x 1 root root 2450144 Jun 6 21:23 /usr/bin/gvim-normal
lrwxrwxrwx 1 root root 4 Jun 6 21:23 /usr/bin/gvimdiff -> gvim
lrwxrwxrwx 1 root root 4 Jun 6 21:23 /usr/bin/rgview -> gvim
lrwxrwxrwx 1 root root 4 Jun 6 21:23 /usr/bin/rgvim -> gvim
-rw-r--r-- 1 root root 4638 Jun 6 21:23 /usr/share/applications/gvim.desktop
drwxr-xr-x 2 root root 0 Jun 6 21:23 /usr/share/doc/packages/gvim
-rw-r--r-- 1 root root 788 Jun 6 21:23 /usr/share/doc/packages/gvim/README.Japanese-XIM
-rw-r--r-- 1 root root 264 Jun 6 21:23 /usr/share/doc/packages/gvim/README.SuSE
-rw-r--r-- 1 root root 2064 Jun 6 21:23 /usr/share/doc/packages/gvim/gvimrc_example.vim
-rw-r--r-- 1 root root 6048 Jun 6 21:23 /usr/share/doc/packages/gvim/suse.gvimrc
-rw-r--r-- 1 root root 262 Jun 6 21:23 /usr/share/pixmaps/gvim.png
there may be a package called something like "base" or "filesystem" which is used to setup the directories and their permissions.
Most, but not all permissions in system directories will owned & group owned by root.
The permissions of these to files may prevent using sudo.
Code:
ls -ls /etc/sudoers /etc/shadow
4 -rw-r----- 1 root shadow 1006 2008-10-01 21:50 /etc/shadow
4 -r--r----- 1 root root 1977 2008-07-27 02:59 /etc/sudoers
---
The problem was probably caused by not using the archive option when using cp. Also, be careful which directories you copy. Some like /proc shouldn't be copied. Some like /tmp are a waste of time copying. Your system may create the /dev/ directory when you boot. And/or your distro may have a command to populate the /dev directory with the devices you need.