Hello,
I have a Debian box (running Testing) which rsyncs some directories
from
a Windows laptop (running XP on an ntfs partition) to a partition on a
local disk on the Debian box.
The Debian box uses rsync via ssh connection made with the XP box
which
has cygwin and ssh server installed. The user used to do the ssh
connection is an administrator on the XP box ('root'). The script is
running from the root account on the Debian box.
The command is something like this:
rsync --delete --modify-window=10 --force -Rvaue ssh
--exclude-from=$EXCLUDESFILE --progress \
xp-box:"/cygdrive/c/Documents\ and\ Settings/user1
/cygdrive/c/Documents\ and\ Settings/user2" /mnt/backups/xp-daily-00;
where $EXCLUDESFILE is a variable defined with the path to the
excludes
files on the Debian box.
Now, this all works very well for making the backups.
However, the permissions of the files pulled from the XP box to the
Debian box are the same as on the XP box. The same two users, user1
and
user2, also exist on the Debian box. However, the gids and uids of
these
users are different on the XP box and on the Debian box. So the users
cannot browse their own directories (backups) from within the Debian
box
(permissions denied).
This is a problem if a user wants to browse, or recover files from,
his
backups by connecting from the XP box to the Debian box using ssh
(because then the user's gid and uid are Debian numbers, not the XP,
or
cygwin on XP, numbers).
Any ideas how I get around this problem?