marshal
June 20th, 2008, 06:06 AM
hi,
i set up a new hdd today to move some stuff there. my main goal was to mount /var/ onto a partition on the new drive, which actually worked fine. to keep the folders i copied the old /var/ using
sudo cp -r /var/ /temp/
and after mounting everything back
sudo cp -r /temp/var/* /var/
but this procedure messed something with the permissions, because several services (lighttpd, mysql, ...) won't work anymore, because they can't access logs or other files always with permissions errors.
is there a way to move files while keeping the permissions, or how can i rebuild the old permissions, hopefully without doing chmod on every single file =)
fstab looks like this:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=9219b517-a9ad-4c3a-89ce-94dc4a805cdd / ext3 relatime,errors=remount-ro 0 1
# /dev/sda2
UUID=cbeaecba-a418-4e94-118c-ef8c7014530d none swap sw 0 0
/dev/sdb1 /var ext3 defaults 0 0
hopefully i put every necessary information. (xubuntu 8.04)
thx for help
i set up a new hdd today to move some stuff there. my main goal was to mount /var/ onto a partition on the new drive, which actually worked fine. to keep the folders i copied the old /var/ using
sudo cp -r /var/ /temp/
and after mounting everything back
sudo cp -r /temp/var/* /var/
but this procedure messed something with the permissions, because several services (lighttpd, mysql, ...) won't work anymore, because they can't access logs or other files always with permissions errors.
is there a way to move files while keeping the permissions, or how can i rebuild the old permissions, hopefully without doing chmod on every single file =)
fstab looks like this:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=9219b517-a9ad-4c3a-89ce-94dc4a805cdd / ext3 relatime,errors=remount-ro 0 1
# /dev/sda2
UUID=cbeaecba-a418-4e94-118c-ef8c7014530d none swap sw 0 0
/dev/sdb1 /var ext3 defaults 0 0
hopefully i put every necessary information. (xubuntu 8.04)
thx for help