Hello I googled about my problem and found some hints but not a complete solution. Situation: On laptop 1, I am user oub (uid=1000) and in the sudo list. I connect an USB drive (jfs file system), its get automatically mounted with the correct uid. I copy files with rsync from laptop 1 to the USB. ( rsync -auvz --progress /home/oub/files /media/usb ) However: On laptop 2, I am user oub (uid=1002) and in the sudo list. Now when I connect the USB (jfs file system) its get automatically mounted however as uid=1000 which is another user on Laptop2. There is a patch for mount which allows to set the UID and GID of the usb drive, but this patch is not standard. https://lwn.net/Articles/497106/ So the only solution I see is to use chmod -R (and chgrp -R) on the target system and then run rsync to copy from the USB to Laptop2. And later to the inverse operation. Is there any possibility that rsync, running with sudo, changes the files it copies to the UID +GIDof the target system? Thanks and regards Uwe Brauer
On Mon 18 Jun 2012, Uwe Brauer wrote:> > Situation: > On laptop 1, I am user oub (uid=1000) and in the sudo list. > I connect an USB drive (jfs file system), its get automatically > mounted with the correct uid.This makes no sense. There is no UID option for mounting a jfs filesystem; that's only appropriate for e.g. VFAT where there is no concept of UID. After mounting a jfs filesystem the files on that filesystem will have the stored UID. Paul
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The problem is that you have different UIDs on different systems but are trying to use the same file system. The files within the file system have the ownerships stored only by the numeric UIDs not the user names. If you then take that file system and connect it to another system that has a different user<>UID mapping it will not be correct (this even applies to NFS). The solution is to use the same user<>UID mappings on all systems or in the case of a removable drive to use a file system that does not store ownerships so that the mount options can specify a file system wide owner. On 06/18/12 08:36, Uwe Brauer wrote:> > Hello > > I googled about my problem and found some hints but not a complete > solution. > > Situation: On laptop 1, I am user oub (uid=1000) and in the sudo > list. I connect an USB drive (jfs file system), its get > automatically mounted with the correct uid. I copy files with rsync > from laptop 1 to the USB. ( rsync -auvz --progress /home/oub/files > /media/usb ) > > However: On laptop 2, I am user oub (uid=1002) and in the sudo > list. Now when I connect the USB (jfs file system) its get > automatically mounted however as uid=1000 which is another user on > Laptop2. There is a patch for mount which allows to set the UID > and GID of the usb drive, but this patch is not standard. > https://lwn.net/Articles/497106/ > > So the only solution I see is to use chmod -R (and chgrp -R) on the > target system and then run rsync to copy from the USB to Laptop2. > > And later to the inverse operation. > > Is there any possibility that rsync, running with sudo, changes the > files it copies to the UID +GIDof the target system? > > > Thanks and regards > > Uwe Brauer >- -- ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ Kevin Korb Phone: (407) 252-6853 Systems Administrator Internet: FutureQuest, Inc. Kevin at FutureQuest.net (work) Orlando, Florida kmk at sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/fOUgACgkQVKC1jlbQAQesBACcDCNHGtHa8cYLMW7d6VmOdSPO qTEAnjUWe6S1jYgKEmJkgW8l8n2R9/Ur =raRm -----END PGP SIGNATURE-----
Uwe Brauer wrote:> Situation: > On laptop 1, I am user oub (uid=1000) and in the sudo list. > I connect an USB drive (jfs file system), its get automatically > mounted with the correct uid. > I copy files with rsync from laptop 1 to the USB. > ( rsync -auvz --progress /home/oub/files /media/usb ) > > However: > On laptop 2, I am user oub (uid=1002) and in the sudo list. > Now when I connect the USB (jfs file system) its get automatically > mounted however as uid=1000 which is another user on Laptop2.Why not write the date on the jfs drive as uid=1002 on laptop1? Unfortunately, ssh doesn't allow numerical user ids AFAIK, but if you have a second user, e.g. "u1002", then you could do: rsync -avx /path/to/src u1002 at localhost:/path/to/usb/dest Have a nice day, Berny
Reasonably Related Threads
- flags not synced correctly with dovecot sync (dsync)
- flags not synced correctly with dovecot sync (dsync)
- flags not synced correctly with dovecot sync (dsync)
- flags not synced correctly with dovecot sync (dsync)
- Processing incoming calls with multiple contextst over PRI