Hi, I need to mirror some Linux directories on a Win2000 box but the owner, group and permissions are lost. I realize Win2000 does not use the same system but thought there may be some way around it with cygwin. Is it possible to mimick /etc/passwd to preserve ownership etc? Is there a better solution? Roger -------------- next part -------------- HTML attachment scrubbed and removed
Roger Hales wrote:> I need to mirror some Linux directories on a Win2000 box but the > owner, group and permissions are lost. I realize Win2000 does not > use the same system but thought there may be some way around it with > cygwin. Is it possible to mimick /etc/passwd to preserve ownership > etc? Is there a better solution?I don't know of a good general purpose solution, or whether you can do something with /etc/passwd. If all the files have the same owner, group, and permissions, I believe you can set parameters in fstab so that when the Win2000 partition is mounted on the Linux box, it has those permissions. Maybe there are other possibilities? Randy Kramer
tim.conway@philips.com
2002-Apr-02 02:21 UTC
File Owner, Group and Permissions for Win2000
First, set this environmental variable in Win2k set CYGWIN=ntea Do it as a system variable. It will let cygwin use the windows permissions, rather than going by extension and #!. Second, copy in all relevant users to your /etc/passwd in cygwin. tconway@USB-FLATUSWIN ~ $ cat /etc/passwd Everyone:*:0:0:,S-1-1-0:: SYSTEM:*:18:18:,S-1-5-18:: Administrators:*:544:544:,S-1-5-32-544:: Administrator::500:513:,S-1-5-21-1454471165-1383384898-854245398-500:/home/Administr ator:/bin/sh Guest::501:513:,S-1-5-21-1454471165-1383384898-854245398-501:/home/Guest:/bin/sh hiram::1001:513:Tim Conway,S-1-5-21-1454471165-1383384898-854245398-1001:/home/hiram :/bin/sh tconway::1000:513:Tim Conway,S-1-5-21-1454471165-1383384898-854245398-1000:/home/tco nway:/bin/sh tconway@USB-FLATUSWIN ~ $ uname -a CYGWIN_NT-5.0 USB-FLATUSWIN 1.1.7(0.31/3/2) 2000-12-25 12:39 i586 unknown tconway@USB-FLATUSWIN ~ $ Third, create local users for each user. I don't have time to set up a sim, but try some experimenting. Remember, it can't use a username that that doesn't exist, and NT doesn't let you assign to unknown numeric user IDs. This should then work. I don't have time to set up a sim, but you get the idea. It's potentially a lot of work. Anybody know of a way to script user creation in Windoze? Tim Conway tim.conway@philips.com 303.682.4917 Philips Semiconductor - Longmont TC 1880 Industrial Circle, Suite D Longmont, CO 80501 Available via SameTime Connect within Philips, n9hmg on AIM perl -e 'print pack(nnnnnnnnnnnn, 19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), ".\n" ' "There are some who call me.... Tim?" "Roger Hales" <hales@q-net.net.au> Sent by: rsync-admin@lists.samba.org 03/30/2002 08:41 AM To: <rsync@lists.samba.org> cc: (bcc: Tim Conway/LMT/SC/PHILIPS) Subject: File Owner, Group and Permissions for Win2000 Classification: Hi, I need to mirror some Linux directories on a Win2000 box but the owner, group and permissions are lost. I realize Win2000 does not use the same system but thought there may be some way around it with cygwin. Is it possible to mimick /etc/passwd to preserve ownership etc? Is there a better solution? Roger
On Monday 1 Apr 02, tim.conway@philips.com writes:> First, set this environmental variable in Win2k > set CYGWIN=nteaTim probably means "ntsec" not "ntea". David
tim.conway@philips.com
2002-Apr-02 08:09 UTC
File Owner, Group and Permissions for Win2000
No, I actually meant "ntea". I found it in some docs somewhere. It enables unix-like permissions. Without it (or maybe ntsec. I never heard of that one), chmod doesn't do anything. Nonetheless, as I recall, you're a cygwin maintainer, and know much more about it than I do. I just know i needed this flag. What does 'ntsec' do? It's a pain to dig through the cygwin doc, as it's multiple files, non-searchable, at least what I find. I just use it like unix, and live with what doesn't work, usually (nothing comes to mind at the moment). Tim Conway tim.conway@philips.com 303.682.4917 Philips Semiconductor - Longmont TC 1880 Industrial Circle, Suite D Longmont, CO 80501 Available via SameTime Connect within Philips, n9hmg on AIM perl -e 'print pack(nnnnnnnnnnnn, 19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), ".\n" ' "There are some who call me.... Tim?" David Starks-Browning <starksb@ebi.ac.uk> Sent by: rsync-admin@lists.samba.org 04/01/2002 12:39 PM To: rsync@lists.samba.org cc: (bcc: Tim Conway/LMT/SC/PHILIPS) Subject: Re: File Owner, Group and Permissions for Win2000 Classification: On Monday 1 Apr 02, tim.conway@philips.com writes:> First, set this environmental variable in Win2k > set CYGWIN=nteaTim probably means "ntsec" not "ntea". David -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
tim.conway@philips.com
2002-Apr-02 08:16 UTC
File Owner, Group and Permissions for Win2000
nevermind my previous questions. just found the cygwin variable doc. Tim Conway tim.conway@philips.com 303.682.4917 Philips Semiconductor - Longmont TC 1880 Industrial Circle, Suite D Longmont, CO 80501 Available via SameTime Connect within Philips, n9hmg on AIM perl -e 'print pack(nnnnnnnnnnnn, 19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), ".\n" ' "There are some who call me.... Tim?"