Re: How to read ntfs_reparse_data

2013-09-14 Thread Matthias Meyer
Andrey Repin wrote:
 
 Oh, also... Are you sure you have full low-level access to partition in
 question? I.e., it is not blocked by antivirus, or UAC?
 
 No, I'm not sure.
 
 Ok, let me rephrase it - are you trying these commands in an elevated
 shell? (i.e. mintty running as administrator.)
I'm running cmd as administrator
 
 In the meantime I find fsutil.exe and tried:
 C:\ cd \Users\meyer
 C:\ fsutil reparsepoint query Cookies
 Error: Access is denied.
 
 But than I tried:
 C:\ mklink /J test C:\Users\meyer\AppData\Roaming\\Cookies
 C:\ fsutil reparsepoint query test
 and this will work. I get my reparse data :)
 I will see if I can reuse this data with setfattr.
 
I believe that I can reuse the data.
Thanks for your answers, for the conversation. It was very helpfull for me 
:)

br
Matthias

-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: How to read ntfs_reparse_data

2013-09-13 Thread Matthias Meyer
Andrey Repin wrote:

 Greetings, Matthias Meyer!
 
 I've installed cygwin 1.7.20 on my Windows7 and try to get reparse data
 of a junction point:
 getfattr -h -e hex -n system.ntfs_reparse_data
 /cygdrive/C/Users/Default\ User but I get an error:
 /cygdrive/C/Users/Default User: system.ntfs_reparse_data: Not supported
 
 If I mount the drive in Linux with ntfs-3g it will work. I get:
 # file: /cygdrive/C/Users/Default User
 system.ntfs_reparse_data=0x03a0f000760078006e005c
 
 Anyone knows this problem? Is there a(nother) way to get the
 system.ntfs_reparse_data? Maybee with a windows program?
 
 I'ld like to restore a junction point within Linux/ntfs-3g.
 
 http://www.cygwin.com/
 The first four paragraphs.
 TL;DR: You're looking the wrong way.
 
 Thanks for the answer but it doesn't help me ;)
 
 Ok, I can give you another answer, more detailed, but I have no idea, how
 much more usable, as I'm no expert in low-level NTFS specifics.
 I can imagine Cygwin tools being able to read, store and restore
 OS-specific file attributes, but I doubt these attributes have any use
 outside OS. I.e., I was unable to use NTFS junction point under Linux.
But not me ;)
If I can get the reparse data of a junction and store it in a backup I'm 
able to boot a PC into Linux and recreate the junction-point. That's my 
goal.
 Junction was to a second partition of the same drive, so there's no
 possibility of missing partitions or similar mistakes on my part. ntfs-3g
 just doesn't work the same way, as native Windows NTFS driver.
Maybee I missunderstood what you are saying. My english isn't well too :)
But ntfs-3g supports the reparse data. I can read (getfattr) the reparse 
data and I can create (setfattr) junctions too.
Unfortunatly it seems that getfattr didn't read the reparse data in cygwin 
environment.
 
 Oh, also... Are you sure you have full low-level access to partition in
 question? I.e., it is not blocked by antivirus, or UAC?
 
No, I'm not sure. In the meantime I find fsutil.exe and tried:
C:\ cd \Users\meyer
C:\ fsutil Cookies
Error: Access is denied.

But than I tried:
C:\ mklink /J test C:\Users\meyer\AppData\Roaming\\Cookies
C:\ fsutil test
and this will work. I get my reparse data :)
I will see if I can reuse this data with setfattr.

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: How to read ntfs_reparse_data

2013-09-12 Thread Matthias Meyer
Andrey Repin wrote:

 Greetings, Matthias Meyer!
 
 I've installed cygwin 1.7.20 on my Windows7 and try to get reparse data
 of a junction point:
 getfattr -h -e hex -n system.ntfs_reparse_data /cygdrive/C/Users/Default\
 User but I get an error:
 /cygdrive/C/Users/Default User: system.ntfs_reparse_data: Not supported
 
 If I mount the drive in Linux with ntfs-3g it will work. I get:
 # file: /cygdrive/C/Users/Default User
 system.ntfs_reparse_data=0x03a0f000760078006e005c
 
 Anyone knows this problem? Is there a(nother) way to get the
 system.ntfs_reparse_data? Maybee with a windows program?
 
 I'ld like to restore a junction point within Linux/ntfs-3g.
 
 http://www.cygwin.com/
 The first four paragraphs.
 TL;DR: You're looking the wrong way.
 
 
 --
 WBR,
 Andrey Repin (anrdae...@yandex.ru) 12.09.2013, 01:56
 
 Sorry for my terrible english...

Thanks for the answer but it doesn't help me ;)
I would beliefe one of the cygwin libraries must read and interpret the 
ntfs_reparse_data because cygwin will display it's content as an posix soft 
link.
So it would possible that getfattr can read this data too and the only 
reason it don't work for me is a mistake by myself.

What did you mean with You're looking the wrong way? What is the rigth 
way?

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



How to read ntfs_reparse_data

2013-09-11 Thread Matthias Meyer
Hi :)

I've installed cygwin 1.7.20 on my Windows7 and try to get reparse data
of a junction point:
getfattr -h -e hex -n system.ntfs_reparse_data /cygdrive/C/Users/Default\ User
but I get an error:
/cygdrive/C/Users/Default User: system.ntfs_reparse_data: Not supported

If I mount the drive in Linux with ntfs-3g it will work. I get:
# file: /cygdrive/C/Users/Default User
system.ntfs_reparse_data=0x03a0f000760078006e005c

Anyone knows this problem? Is there a(nother) way to get the
system.ntfs_reparse_data? Maybee with a windows program?

I'ld like to restore a junction point within Linux/ntfs-3g.

Thanks in advance
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Howto compile package

2013-02-17 Thread Matthias Meyer
Dear all,

I would like to patch and compile rsync.
I'll prefer to cross compile from linux (debian) to cygwin.
Is that possible? I didn't find any (actual) documentation about this.

Thanks in advance
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



admin sees another file-owner as a normal user

2011-04-22 Thread Matthias Meyer
Hi,

I've installed cygwin V1.7.5 within Windows7 SP1.
Curiously a file seems to have two different owners. Depends on the account 
which list the file.


If I run a cmd as a normal user and list file:
C:\ls -lh /
drwxrwx---+  1    Administrators  16K 2011-04-22 10:46 bin
C:\ls -lhn /
drwxrwx---+  1 4294967295 544  16K 2011-04-22 10:46 bin

If I run a cmd as administrator and list file:
C:\ls -lh /
drwxrwx---+  1 Backup Administrators  16K 2011-04-22 10:46 bin
C:\ls -lhn /
drwxrwx---+  1 1033 544  16K 2011-04-22 10:46 bin


I haven't any problem because of this behaviour but I want understand what 
happens their.

Thanks for any hint
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: admin sees another file-owner as a normal user

2011-04-22 Thread Matthias Meyer
Matthias Meyer wrote:

 Hi,
 
 I've installed cygwin V1.7.5 within Windows7 SP1.
 Curiously a file seems to have two different owners. Depends on the
 account which list the file.
 
 
 If I run a cmd as a normal user and list file:
 C:\ls -lh /
 drwxrwx---+  1    Administrators  16K 2011-04-22 10:46 bin
 C:\ls -lhn /
 drwxrwx---+  1 4294967295 544  16K 2011-04-22 10:46 bin
 
 If I run a cmd as administrator and list file:
 C:\ls -lh /
 drwxrwx---+  1 Backup Administrators  16K 2011-04-22 10:46 bin
 C:\ls -lhn /
 drwxrwx---+  1 1033 544  16K 2011-04-22 10:46 bin
 
 
 I haven't any problem because of this behaviour but I want understand what
 happens their.
 
 Thanks for any hint
 Matthias

Damned!!
I'm looking around this since 3 days. Today I write this mail to you and 
5min later I am stumbling about the solution.
Should I laugh or cry?

As normal user grep 1033 /etc/passwd don't deliver a result. So I removed 
/etc/passwd.
After this the misterious was removed too. It seems there was two files 
/etc/passwd on the same place. An old one (without the user 1033) and the 
actual one.

Anyone knows how it is possible to have one file two times?

Thanks and Happy Easter
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



How to determine actual character set

2011-03-20 Thread Matthias Meyer
Hi,

I use cygwin 1.7.5 and run backups from Windoze to my Linux server by using 
BackupPC.
I want to set the windows character set within the backuppc configuration 
for preventing me from this filename renamings (e.g. the german ü will be 
replaced by ?)

But how to determine the windows character set?
chcp will only deliver the code page (850 in one of my clients).
But I need something like cp1252

Is there a program within cygwin which would resolve my pain ;-)

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



unknown owner 4294967295 should be Adminstrators

2011-01-02 Thread Matthias Meyer
First I want to wish you a happy new year :-)

I've a owner-problem with my Windows XP.
Most of the files which should be owned by Administrators are owned by
4294967295, an unknown user.

$ cat /etc/passwd
SYSTEM:*:18:544:,S-1-5-18::
LocalService:*:19:544:U-NT AUTHORITY\LocalService,S-1-5-19::
NetworkService:*:20:544:U-NT AUTHORITY\NetworkService,S-1-5-20::
Administrators:*:544:544:,S-1-5-32-544::
Administrator:unused:500:513:U-NETTI\Administrator,S-1-5-21-682954488-2327617611-1172701873-500:/home/Administrator:/bin/bash

How to chown all files from 4294967295:18 to 544:18 or, at least, recognize
the files to be owned by Administrators.

chown -R ... would not work because it will chown all files. Also the files
not owned by 4294967295.

chown -vR --from=4294967295:18 Adminstrators:SYSTEM ...
chown: invalid user: `4294967295:18'

Thanks in advance
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: V1.7 and endless loops triggerd by junction points

2010-05-16 Thread Matthias Meyer
Matthias Meyer wrote:

 Corinna Vinschen wrote:
 
 On May  6 10:41, Corinna Vinschen wrote:
 On May  5 21:15, Matthias Meyer wrote:
  Corinna Vinschen wrote:
   Otherwise, the only difference as far as I can see is the fact that
   the user token attrib inherited from the Cygwin shell has more user
   rights
   enabled.  Namely the backup and restore rights, which allows to
   access
   files and directories which are not available by default.  However,
   this only works in an elevated shell, too.
   
   However, it's not Cygwin's fault that attrib is not up to speed with
   circular symlinks on an OS which allows them.
   
  It seems to be the backup and restore rights. I can run a cmd as
  administrator and attrib don't run into the endless loop.
  Also I can run sh from a normal user and attrib will work right.
  Only if I run attrib within a process with the backup and restore
  rights attrib will run into this endless loop :-(
 
 There's a workaround for you, the cygdrop tool, part of the cygutils
 package.
 
 Here's an example:
 
   elevated bash$ cd /cygdrive/c/Users/All\ Users
 
   elevated bash$ attrib Desktop
   HR   C:\ProgramData\Desktop
 
   elevated bash$ attrib Desktop\\Cygwin.lnk
   AC:\ProgramData\Desktop\Cygwin.lnk
 
   elevated bash$ cygdrop -p SeBackupPrivilege
   /cygdrive/c/Windows/System32/attrib -p Desktop\\Cygwin.lnk File not
   found - Desktop\Cygwin.lnk
 
 Unfortunately you have to use the full path to attrib to make it work
 since cygdrop doesn't perform a path search.
 
 Sorry about that.  It appears I just stumbled over a Cygwin bug in terms
 of casesensitivity when using the execp family of functions.  Just
 calling `cygdrop -p SeBackupPrivilege attrib' without full path should
 be fine, but it only works on systems which are not configured for
 casesensitivity.  I'll fix that in CVS.
 
 
 Corinna
 
 Thank you very much. I will try it after solving my feature number one
 (cursor/backspace) ;-)
 
 br
 Matthias

cd /cygdrive/c
cygdrop -p SeBackupPrivilege attrib /S /D

works like a charme :-)

Thanks a lot
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: 1.7.5 ssh no longer functions after upgrade from 1.5

2010-05-14 Thread Matthias Meyer
Scott D Friedemann wrote:

 After upgrading, attempts to use SSH give Server refused our key.
 Trying to enter the user password is rejected, too.  Everything wor
 
 I haven't found any documentation about upgrading SSH so don't know what
 might be wrong.  I ran /bin/copy-user-registry-fstab
 
 What might I have missed?

I am looking for a solution to a aimiliar problem the last week.
In my case I found and solve two mistakes:

1) usernames in v1.5 are case insensitive but not in v1.7.5. e.g. ssh
me...@cygwinhost is not the same as ssh me...@cygwinhost

2) sshd_config:
AuthorizedKeysFile .ssh/authorized_keys is not the same
as #AuthorizedKeysFile .ssh/authorized_keys.
I have to remark the line in v1.7.5 but not in v1.5.

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: 1.7.5 ssh no longer functions after upgrade from 1.5

2010-05-14 Thread Matthias Meyer
Scott D Friedemann wrote:

 On 5/14/10 8:23 AM, Matthias Meyer wrote:
 I am looking for a solution to a aimiliar problem the last week.
 In my case I found and solve two mistakes:

 1) usernames in v1.5 are case insensitive but not in v1.7.5. e.g. ssh
 me...@cygwinhost is not the same as ssh me...@cygwinhost

 2) sshd_config:
 AuthorizedKeysFile .ssh/authorized_keys is not the same
 as #AuthorizedKeysFile .ssh/authorized_keys.
 I have to remark the line in v1.7.5 but not in v1.5.
 
 I have been using case sensitive naming and
 the  AuthorizedKeysFile  line was commented out even in 1.5.
 
 Are there other ideas?
 
 Would it help if SSH was set up from scratch again?
Yes!
Optionally install openssh again. Than call ssh-host-config as well as
ssh-user-config.
Recognize any library error. The dependency management during cygwin
installation isn't very well. My installation was missing one or two
necessary cyg-libraries.

I've forgotten the third part :-(
remove all keys called cygnus* from registry. They are from v1.5 and wether
necessary nor helpfull in v1.7.5.

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: 1.7.5 ssh no longer functions after upgrade from 1.5

2010-05-14 Thread Matthias Meyer
Corinna Vinschen wrote:

 On May 14 15:23, Matthias Meyer wrote:
 1) usernames in v1.5 are case insensitive but not in v1.7.5. e.g. ssh
 me...@cygwinhost is not the same as ssh me...@cygwinhost
 
 This has nothing to do with Cygwin 1.7.  It was a security change in
 OpenSSH 5.4p1:
 http://cygwin.com/ml/cygwin-announce/2010-03/msg7.html
 
 2) sshd_config:
 AuthorizedKeysFile .ssh/authorized_keys is not the same
 as #AuthorizedKeysFile .ssh/authorized_keys.
 
 This was a generic bug in OpenSSH 5.4 which has been fixed in the 5.5
 release: http://cygwin.com/ml/cygwin-announce/2010-04/msg00026.html
 
 
 Corinna
 
Damned ;-)

I work hard, nearly a week to figure it out.
I proudly present my knowledge here.
But you knows that already!

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: V1.7 can not use cursor or backspace within a shell

2010-05-11 Thread Matthias Meyer
Andy Koppe wrote:

 Matthias Meyer wrote:
 cygwin 1.7.5 need, at least, the /usr/share/terminfo/63/cygwin file.

 cygwin 1.7.2, used by the actual copssh distribution, didn't need this
 file.
 
 Third-party Cygwin distributions like copssh aren't supported here.
 
 /usr/share/terminfo isn't used by the Cygwin DLL, so the DLL version
 (1.7.2 vs 1.7.5) is irrelevant here. It is used by ncurses though, and
 the terminfo database format has changed fairly recently. Look for
 terminfo and ncurses announcements.
 
 Somebody knows:
 1) what is the job of the other directories (41..78)
 below /usr/share/terminfo ?
 
 They're hexadecimal ASCII codes representing the first character of
 the terminal type. '63' is ASCII for 'c', as in 'cygwin'. '78' is 'x'
 as in 'xterm'.
 
 Andy

Thanks, have a great day!
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: V1.7 can not use cursor or backspace within a shell

2010-05-10 Thread Matthias Meyer
Andy Koppe wrote:

 Matthias Meyer:
 I'm stumped. I think 'cygcheck -svr' output is needed to
 get any further. Please attach, not include it, and make sure you
 delete any sensitive info from it first.

 see attachment :-)
 
 You've got Cygwin installed under 'C:/Program Files', which I suspect
 is likely to cause trouble due to the space. (That directory appears
 as the spaceless 'Programme' on a German system, but its real name is
 'Program Files'.) It certainly shouldn't be missing awk, tar or test.
 You also still have Cygwin 1.7.1, whereas 1.7.5 is current.
 
 ... and it say: Warning: There are multiple cygwin1.dlls on your path
 = How to find and/or configure the path?
 
 It's there in the cygcheck output. The Windows-wide PATH can be
 configured under Control Panel-System-Advanced-Environment
 Variables (or thereabouts).
 
 I've removed this items. I will install cygwin again if necessary.
 
 Yep, a clean install into a directory without a space in the name
 would seem the best way forward.
 
 Andy
ok, a clean install will work.
Unfortunately I want to build my own setup.exe, similar to cwrsync ;-)
So I have to find out what are the differences between a 1.5 and a 1.7
setup.

Nevertheless, thank you for your help.
I will post my deliverable within the next days.

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: V1.7 can not use cursor or backspace within a shell

2010-05-10 Thread Matthias Meyer
Hello,

The solution should not be far away ;-)
cygwin 1.7.5 need, at least, the /usr/share/terminfo/63/cygwin file.

cygwin 1.7.2, used by the actual copssh distribution, didn't need this file.

Somebody knows:
1) what is the job of the other directories (41..78)
below /usr/share/terminfo ?
2) has the handling of terminals been changed between v1.7.2 and v1.7.5 ?

Thanks in advance
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: V1.7 can not use cursor or backspace within a shell

2010-05-06 Thread Matthias Meyer
Andy Koppe wrote:

 Matthias Meyer:
 Andy Koppe wrote:
 Matthias Meyer wrote:
 I've installed cygwin 1.7 in Vista and have two problems, not known
 prior with cygwin 1.5.25:

 1) If I login in a shell (e.g. sh --login -i) I can not use cursor or
 backspace keys. It seems that the cursor can't go into the left
 direction. Cursor up will resolve in one line like:
 $ tail /cygdrive/c/Attrib/attributes$ ls -alh
 /cygdrive/c/Attrib/attributes instead two different lines like
 $ tail /cygdrive/c/Attrib/attributes
 $ ls -alh /cygdrive/c/Attrib/attributes

 Weird. Messed up tty settings perhaps. How and where are you running
 that shell? What's the output of 'stty -a'? Also, cygcheck output as
 requested at http://cygwin.com/problems.html might be helpful.

 I running this shell by ssh (with private/public key authentication) or
 by sh --login -i from windows cmd. The same behaviour in both types of
 shell.

 As far as I know I've not configured anything for a shell.

 $ stty -a
 speed 38400 baud; rows 25; columns 80; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
 eol2 = undef; swtch = ^Z; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
 werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
 -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
 -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon
 -ixoff -iuclc -ixany -imaxbel
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -tostop
 echoctl echoke
 
 Hmm, a few of those are different from what they are on my machine:
 ixon -echo -echoe -echoctl -echoke, but changing them doesn't produce
 the effect you're seeing. Still begs the question though why they are
 different. Any chance there's a mixup with different Cygwin versions
 or a different Unix environment?

Thats possible in principal but I don't believe so. I've installed cygwin
1.5.25 in the past. But I removed it and install cygwin 1.7.1.
I've checked registry and filesystem too.
On the other hand it is a dualboot pc. On the drive for windows xp cygwin
1.5.25 is installed. This drive is mounted within my Vista too.
So I have one cygwin1.dll V1.7.1 in C:\Programme\backup\bin and another
cygwin1.dll V1.5.25 in D:\Programme\backup\bin.
But this should not be a problem. Hopefully only the cygwin1.dll installed
in Vista on drive C:\ will be used.
 
 Otherwise, I'm stumped. I think 'cygcheck -svr' output is needed to
 get any further. Please attach, not include it, and make sure you
 delete any sensitive info from it first.

see attachment :-)
... and it say: Warning: There are multiple cygwin1.dlls on your path
= How to find and/or configure the path?

 
 Also, what happens if you invoke Cygwin from the desktop or start menu
 shortcut? You could also try installing mintty or rxvt to see whether
 you get the same problem there.

I've removed this items. I will install cygwin again if necessary.

 
 Andy

Thanks
Matthias
-- 
Don't Panic
---BeginMessage---
Cygwin Configuration Diagnostics
Current System Time: Thu May 06 07:48:00 2010

Windows Vista Ultimate Ver 6.0 Build 6002 Service Pack 2

Path:   C:\Program Files\Backup\usr\local\bin
C:\Program Files\Backup\bin
C:\Program Files\Backup\bin
C:\Program Files\Backup\usr\X11R6\bin
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem

Output from C:\Program Files\Backup\bin\id.exe
UID: 1000(meyer) GID: 513(None)
544(Administratoren) 545(Benutzer)513(None)

SysDir: C:\Windows\system32
WinDir: C:\Windows

PWD = '/cygdrive/c/Programme/backup/bin'
HOME = '/home/meyer'

HOMEPATH = '\Users\meyer'
APPDATA = 'C:\Users\meyer\AppData\Roaming'
HOSTNAME = 'netti2
'
TERM = 'cygwin'
PROCESSOR_IDENTIFIER = 'x86 Family 6 Model 14 Stepping 12, GenuineIntel'
WINDIR = 'C:\Windows'
PUBLIC = 'C:\Users\Public'
USERDOMAIN = 'netti2'
OS = 'Windows_NT'
ALLUSERSPROFILE = 'C:\ProgramData'
TEMP = '/cygdrive/c/Users/meyer/AppData/Local/Temp'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
USERNAME = 'meyer'
PROCESSOR_LEVEL = '6'
FP_NO_HOST_CHECK = 'NO'
SYSTEMDRIVE = 'C:'
USERPROFILE = 'C:\Users\meyer'
PS1 = '\[\e]0;\w\a\]\n\[\e[32m\...@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
LOGONSERVER = '\\NETTI2'
PROCESSOR_ARCHITECTURE = 'x86'
LOCALAPPDATA = 'C:\Users\meyer\AppData\Local'
!C: = 'C:\Programme\backup\bin'
ProgramData = 'C:\ProgramData'
SHLVL = '1'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
HOMEDRIVE = 'C:'
PROMPT = '$P$G'
COMSPEC = 'C:\Windows\system32\cmd.exe'
TMP = '/cygdrive/c/Users/meyer/AppData/Local/Temp'
SYSTEMROOT = 'C:\Windows'
PROCESSOR_REVISION = '0e0c'
PROGRAMFILES = 'C:\Program Files'
NUMBER_OF_PROCESSORS = '2'
COMPUTERNAME = 'NETTI2'
_ = '/usr/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_CURRENT_USER\Software

Re: V1.7 and endless loops triggerd by junction points

2010-05-06 Thread Matthias Meyer
Corinna Vinschen wrote:

 On May  6 10:41, Corinna Vinschen wrote:
 On May  5 21:15, Matthias Meyer wrote:
  Corinna Vinschen wrote:
   Otherwise, the only difference as far as I can see is the fact that
   the user token attrib inherited from the Cygwin shell has more user
   rights
   enabled.  Namely the backup and restore rights, which allows to
   access
   files and directories which are not available by default.  However,
   this only works in an elevated shell, too.
   
   However, it's not Cygwin's fault that attrib is not up to speed with
   circular symlinks on an OS which allows them.
   
  It seems to be the backup and restore rights. I can run a cmd as
  administrator and attrib don't run into the endless loop.
  Also I can run sh from a normal user and attrib will work right.
  Only if I run attrib within a process with the backup and restore
  rights attrib will run into this endless loop :-(
 
 There's a workaround for you, the cygdrop tool, part of the cygutils
 package.
 
 Here's an example:
 
   elevated bash$ cd /cygdrive/c/Users/All\ Users
 
   elevated bash$ attrib Desktop
   HR   C:\ProgramData\Desktop
 
   elevated bash$ attrib Desktop\\Cygwin.lnk
   AC:\ProgramData\Desktop\Cygwin.lnk
 
   elevated bash$ cygdrop -p SeBackupPrivilege
   /cygdrive/c/Windows/System32/attrib -p Desktop\\Cygwin.lnk File not
   found - Desktop\Cygwin.lnk
 
 Unfortunately you have to use the full path to attrib to make it work
 since cygdrop doesn't perform a path search.
 
 Sorry about that.  It appears I just stumbled over a Cygwin bug in terms
 of casesensitivity when using the execp family of functions.  Just
 calling `cygdrop -p SeBackupPrivilege attrib' without full path should
 be fine, but it only works on systems which are not configured for
 casesensitivity.  I'll fix that in CVS.
 
 
 Corinna
 
Thank you very much. I will try it after solving my feature number one
(cursor/backspace) ;-)

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: V1.7 and endless loops triggerd by junction points

2010-05-05 Thread Matthias Meyer
Andy Koppe wrote:

 Matthias Meyer wrote:
 I've installed cygwin 1.7 in Vista and have two problems, not known prior
 with cygwin 1.5.25:

 1) If I login in a shell (e.g. sh --login -i) I can not use cursor or
 backspace keys. It seems that the cursor can't go into the left
 direction. Cursor up will resolve in one line like:
 $ tail /cygdrive/c/Attrib/attributes$ ls -alh
 /cygdrive/c/Attrib/attributes instead two different lines like
 $ tail /cygdrive/c/Attrib/attributes
 $ ls -alh /cygdrive/c/Attrib/attributes
 
 Weird. Messed up tty settings perhaps. How and where are you running
 that shell? What's the output of 'stty -a'? Also, cygcheck output as
 requested at http://cygwin.com/problems.html might be helpful.
 
I running this shell by ssh (with private/public key authentication) or
by sh --login -i from windows cmd. The same behaviour in both types of shell.

As far as I know I've not configured anything for a shell.

$ stty -a
speed 38400 baud; rows 25; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
eol2 = undef; swtch = ^Z; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff
-iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -tostop echoctl echoke

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: V1.7 and endless loops triggerd by junction points

2010-05-05 Thread Matthias Meyer
Corinna Vinschen wrote:

 On May  5 06:21, Andy Koppe wrote:
 Matthias Meyer wrote:
  2) In the opposite to V1.5.25 ls -alh /cygdrive/c/users/ shows the
  Vista Junction points like linux soft links. That is nice :-)
  But the Windows Program attrib /S /D will follow this symbolic links
  and therefore it comes into an endless loop. e.g.:
  C:\Documents and Settings\All Users\Application Data\Application
  Data\.. This behaviour will take place too if I run it with cmd /c
  attrib Both above means by running it within a bash shell. If I run
  attrib from a cmd box it work correct.
 
 I don't see how that could possibly be the fault of Cygwin or bash.
 It's a Windows program dealing with a Windows filesystem feature. Sure
 you're actually running the same 'attrib' in both environments?
 
 It could be a result of running attrib once in a normal and once in an
 elevated shell.

Sorry for my english ;-( An elevated shell means a shell with enhanced
privileges?
 
 Otherwise, the only difference as far as I can see is the fact that the
 user token attrib inherited from the Cygwin shell has more user rights
 enabled.  Namely the backup and restore rights, which allows to access
 files and directories which are not available by default.  However, this
 only works in an elevated shell, too.
 
 However, it's not Cygwin's fault that attrib is not up to speed with
 circular symlinks on an OS which allows them.
 
 
 Corinna
 
It seems to be the backup and restore rights. I can run a cmd as
administrator and attrib don't run into the endless loop.
Also I can run sh from a normal user and attrib will work right.
Only if I run attrib within a process with the backup and restore rights
attrib will run into this endless loop :-(

Thanks
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



V1.7 and endless loops triggerd by junction points

2010-05-04 Thread Matthias Meyer
Hello,

I've installed cygwin 1.7 in Vista and have two problems, not known prior
with cygwin 1.5.25:

1) If I login in a shell (e.g. sh --login -i) I can not use cursor or
backspace keys. It seems that the cursor can't go into the left direction.
Cursor up will resolve in one line like:
$ tail /cygdrive/c/Attrib/attributes$ ls -alh /cygdrive/c/Attrib/attributes
instead two different lines like
$ tail /cygdrive/c/Attrib/attributes
$ ls -alh /cygdrive/c/Attrib/attributes


2) In the opposite to V1.5.25 ls -alh /cygdrive/c/users/ shows the Vista
Junction points like linux soft links. That is nice :-)
But the Windows Program attrib /S /D will follow this symbolic links and
therefore it comes into an endless loop. e.g.:
C:\Documents and Settings\All Users\Application Data\Application Data\..
This behaviour will take place too if I run it with cmd /c attrib
Both above means by running it within a bash shell. If I run attrib from a
cmd box it work correct.

Thanks for any hint
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: chown in vista not work because of permission denied

2010-05-03 Thread Matthias Meyer
Corinna Vinschen wrote:

 On May  3 00:26, Matthias Meyer wrote:
 Hello,
 
 I have a cygwin 1.5.25 installation on a vista client.
 I can access the vista client by ssh. For that I use an account
 called backup.
 
 I want use the ssh account for backup/restore with rsync.
 The Backup work well but the restore not :-(
 The files from a restore are owned by the ssh-account and not by the
 original user.
 
 That's an UAC induced problem.  Should work fine with Cygwin 1.7.

Fine. So I will try cygwin 1.7.

 The other alternative is to switch off UAC entirely.
Not the best of all ideas ;-)
 
 
 Corinna
 
Thanks
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



chown in vista not work because of permission denied

2010-05-02 Thread Matthias Meyer
Hello,

I have a cygwin 1.5.25 installation on a vista client.
I can access the vista client by ssh. For that I use an account
called backup.

I want use the ssh account for backup/restore with rsync.
The Backup work well but the restore not :-(
The files from a restore are owned by the ssh-account and not by the
original user.
I get an rsync error:
rsync: chown /Users/matthias/Desktop/.logfile.lnk.Ud0Zgp (in C) failed:
Permission denied (13)

I would believe if I can solve the following construction my problem above
will be solved too:
If I login into this ssh bac...@vista I can create a file but I can not
change the owner afterwards.
$ echo test  /cygdrive/c/Users/matthias/Desktop/test.txt
$ ls -alh /cygdrive/c/Users/matthias/Desktop/test.txt
-rw-r--r--   1 Backup   None  5 May  3 00:07 test.txt

$ chown matthias /cygdrive/c/Users/matthias/Desktop/test.txt
chown: changing ownership of `test.txt': Permission denied

I've set the following rights for the user backup
net localgroup ${admingroup} backup /add
editrights -a SeBackupPrivilege -u backup 
editrights -a SeRestorePrivilege -u backup 
editrights -a SeServiceLogonRight -u backup

Thanks in advance
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



setfacl.exe includes Trojaner TR/Dropper.Gen ?

2009-11-08 Thread Matthias Meyer
Avira AntiVir Personal found the Trojaner TR/Dropper.Gen within setfacl.exe
as well as in getfacl.exe.
It seems that AntiVir found this Trojan with a generic detection routine.

Anybody knows something about this?

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: How to deny directory-access for one dedicated user

2009-10-17 Thread Matthias Meyer
Dave Korn wrote:

 Andy Koppe wrote:
 2009/10/13 Matthias Meyer:
 But nevertheless, user Backup can access the directory as well as the
 files
 
 Does user Backup have Administrator privileges?
 
   No, user Backup User has the Backup/Restore privilege.  These are
 well-known reserved names in the NT security architecture.
 
   And in fact administrator privs don't get you access to any file you
   like:
 as it happens, the reason why adminstrators in fact *can* access any file
 on the system, regardless of ACLs, is because they have _backup_
 privileges - it's the exact inverse of the question you asked!
 
   This is one of those areas where the underlying windows OS architecture
 diverges significantly from how things work in POSIX land and Cygwin can't
 do
 all that much to fudge over it.  You can be uid 0 on windows and not be
 able to read a file when you want, or you can have uid non-zero and yet
 still get complete access to every file you like!
 
 cheers,
   DaveK

My user is called backup. It is an own created user.
backup is member of the administrator group and have the following
additional privileges, defined by editrights:
SeBackupPrivilege
SeRestorePrivilege
SeServiceLogonRight

Thanks jason for the cacls hint.
I tried cacls C:\Test /E /D backup. /E is very importand ;-)
But as before, user backup can acccess the directory.

Also after removing of the administrator group from user backup
and re-login, backup can access C:\Test.

administra...@hostxp /
$ cacls C:\Test
C:\Test HOSTXP\Backup4U:(OI)(CI)N
VORDEFINIERT\Administratoren:(OI)(CI)F  # 
predefined\Administrator:...
NT-AUTORITT\SYSTEM:(OI)(CI)F
HOSTXP\meyer:F
ERSTELLER-BESITZER:(OI)(CI)(IO)F# creater-owner:...
VORDEFINIERT\Benutzer:(OI)(CI)R # predefined\user:...
VORDEFINIERT\Benutzer:(CI)(Beschrnkter Zugriff:)# 
predefined\user:.(restricted access:)
  FILE_APPEND_DATA

VORDEFINIERT\Benutzer:(CI)(Beschrnkter Zugriff:)
  FILE_WRITE_DATA

bac...@hostxp ~
$ cacls C:\Test
C:\Test
Zugriff verweigert  #=access denied

bac...@hostxp ~
$ ls -alh C:\Test
total 0
drwx--+  2 meyer   Kein   0 Oct 17 13:15 .
drwxrwxr-x+ 12 Administratoren SYSTEM 0 Oct 17 13:15 ..
-rwx--+  1 meyer   Kein   0 Oct 17 13:15 Neu Textdokument.txt

How to solve my goal?
The user backup should backup all data but not certain directories.

Thanks
Matthias
-- 
Don't Panic

PS: Sorry for the inconvenience with German.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



howto schtasks without being within administrator group

2009-10-17 Thread Matthias Meyer
Hello,

Is there a way to run a schtasks without being in the administrator group?
Is there a privilege, setting by editrights, which would solve that?

Thanks
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



How to deny directory-access for one dedicated user

2009-10-13 Thread Matthias Meyer
Hello,

I run cygwin on Windows (XP as well as Vista) with NTFS.

I want to deny access to a directory for one dedicated user.
I tried it with:
$ setfacl -m u:backup:0 /cygdrive/c/test
$ getfacl /cygdrive/c/test
# file: /cygdrive/c/test
# owner: meyer
# group: Kein
user::rwx
user:Backup:---
group::r-x
mask:rwx
other:r-x
default:user::rwx
default:group::r-x
default:other:r-x

But nevertheless, user Backup can access the directory as well as the files
in it.

How to reach my goal?
Thanks
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: cygrunsrv/autossh howto start even the destination address is not reachable yet?

2009-10-05 Thread Matthias Meyer
Am Sonntag 04 Oktober 2009 schrieb Julio Costa:
 Hi,
 
 On Sun, Oct 4, 2009 at 17:57, Matthias Meyer wrote:
  Hi,
 
  I've running port forwarding in WindowsXP as well as Windows Vista by 
using
  autossh, running as a service, installed by cygrunsrv.
 
  cygrunsrv -I service-tunnel -f secure tunnel for service \
         -n -t auto -y tcpip -O -u $priv_user -w $priv_pwd -p /bin/nice \
         -a -n 10 /bin/autossh -R 12345:localhost:22 \
         -M 0 -N -C -i /etc/ssh/id_rsa -p 24 u...@server.domain.at
 
  My problem is:
  If the client have a dialin connection to an internet provider, the 
internet
  connection isn't established when the autossh service will be started.
  Therefore I get an error message:
  ssh: Could not resolve hostname server.domain.at: no address associated 
with
  name
 
  How to configure/install the service wether in a way that he waits for 
an
  established internet connection or in a way that he try again until the
  hostname can be resolved?
 
  If autossh is started succesfull and I disconnect the internet 
connection,
  autossh will try again and again until the connection is established 
again.
  But autossh do not start if the hostname can not be resolved.
 
 
 I use autossh a lot, although not in a service.
 
 From what I can see, AUTOSSH_GATETIME is your friend.
 Add it to the service instalation with -e AUTOSSH_GATETIME=0
 
Yes, AUTOSSH_GATETIME do the work.

Thank you
Matthias


-- 
Don't Panic

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



cygrunsrv/autossh howto start even the destination address is not reachable yet?

2009-10-04 Thread Matthias Meyer
Hi,

I've running port forwarding in WindowsXP as well as Windows Vista by using 
autossh, running as a service, installed by cygrunsrv.

cygrunsrv -I service-tunnel -f secure tunnel for service \
-n -t auto -y tcpip -O -u $priv_user -w $priv_pwd -p /bin/nice \
-a -n 10 /bin/autossh -R 12345:localhost:22 \
-M 0 -N -C -i /etc/ssh/id_rsa -p 24 u...@server.domain.at

My problem is:
If the client have a dialin connection to an internet provider, the internet 
connection isn't established when the autossh service will be started.
Therefore I get an error message:
ssh: Could not resolve hostname server.domain.at: no address associated with 
name

How to configure/install the service wether in a way that he waits for an 
established internet connection or in a way that he try again until the 
hostname can be resolved?

If autossh is started succesfull and I disconnect the internet connection, 
autossh will try again and again until the connection is established again.
But autossh do not start if the hostname can not be resolved.

Thanks for your hints
Matthias
-- 
Don't Panic

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Cygwin OpenSSH and Windows 7 RC

2009-06-29 Thread Matthias Meyer
David Christensen wrote:

 Matthias Meyer wrote:
 If I rebase within Windows7 I can not use this programs and librarys
 within other versions of Windows, right?
 
 Are you trying to share one Cygwin installation between multiple
 operation system installations (e.g. over a network, dual boot, flash
 drive, etc.)?  I tried that years ago, and it was very confusing/
 frustrating.  I do one Cygwin installation (located at C:\cygwin) per
 O/S installation and recommend that you do the same.

No, thats not what I am doing.
I install cygwin in XP and build a new setup.exe (with Inno Setup) bundled
with own programs.
This setup.exe is installable and run well within XP as well as within Vista
but not within Windows 7.
 
 It is my assumption that the 'rebase' utility affects the installed
 Cygwin files, not the downloaded setup files.  (The downloaded setup
 files need to match what is on the Cygwin mirrors, or the Cygwin Setup
 checksum should fail.)
 
Therefore I assume that I can not rebase the cygwin files and estimate that
they would run in XP, Vista and Windows 7.
I would believe I have to make a separate setup.exe for Windows 7 with
cygwin files that I rebased before within Windows 7.
Thats right?

But if this is right, I would wait some month and hope that cygwin 1.7 will
run without rebasing in all three windows versions.

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Cygwin OpenSSH and Windows 7 RC

2009-06-29 Thread Matthias Meyer
Karl M wrote:

 Hi...
  
 Are you also providing the source code for the Cygwin pckages that you
 distribute this way, and for your programs that are linked with Cygwin?
  
 Thanks,
  
 ...Karl
No, should/must I do?
I provide the cygwin GPL (as well as rsync GPL and ssh GPL).
I didn't link any program against cygwin. I build a setup similiar cwrsync.
I add some scripts and one native windows program.
The setup.exe install and configure a ssh tunnel from my clients to my
server.

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Cygwin OpenSSH and Windows 7 RC

2009-06-28 Thread Matthias Meyer
David Christensen wrote:

 Matthias Meyer wrote:
 Most of the time ssh can not connect to the sshd in Windows7.
 In my logfile (in Windows7) I found:
  7300 [main] sshd 3772 child_copy: linked dll data write copy failed,
 0x2C5000..0x2C52E0, done 0, windows pid 3512, Win32 error 487
 
 Have you done a rebaseall?
 
  
 http://www.heikkitoivonen.net/blog/2008/11/26/cygwin-upgrades-and-rebase
 all/
 
 
 I was getting weird Perl 'make test' errors, and rebaseall fixed them.
 
 
 David

If I rebase within Windows7 I can not use this programs and librarys within
other versions of Windows, right?

Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin OpenSSH and Windows 7 RC

2009-06-28 Thread Matthias Meyer
Corinna Vinschen wrote:

 On Jun 28 12:18, Matthias Meyer wrote:
 David Christensen wrote:
 
  Matthias Meyer wrote:
  Most of the time ssh can not connect to the sshd in Windows7.
  In my logfile (in Windows7) I found:
   7300 [main] sshd 3772 child_copy: linked dll data write copy failed,
  0x2C5000..0x2C52E0, done 0, windows pid 3512, Win32 error 487
  
  Have you done a rebaseall?
  
   
 
http://www.heikkitoivonen.net/blog/2008/11/26/cygwin-upgrades-and-rebase
  all/
  
  
  I was getting weird Perl 'make test' errors, and rebaseall fixed them.
  
  
  David
 
 If I rebase within Windows7 I can not use this programs and librarys
 within other versions of Windows, right?
 
 rebasing has nothing to do with the OS on which you use the DLLs.
 
 
 Corinna
 
Than, maybee, rebasing is not a solution for my problem.
I build an own setup, similar cwrsync. This setup run well within XP and
Vista. But in Windows7rc the sshd have the above problem.

So I want to ask:
Should I rebase cygwin within Windows7?
And if I install this rebased programs and librarys within XP, should it
work too?

Thanks
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Cygwin OpenSSH and Windows 7 RC

2009-06-27 Thread Matthias Meyer
I have a similar problem.
Most of the time ssh can not connect to the sshd in Windows7.

In my logfile (in Windows7) I found:
   7300 [main] sshd 3772 child_copy: linked dll data write copy failed,
0x2C5000..0x2C52E0, done 0, windows pid 3512, Win32 error 487

I didn't believe that the /etc/host.deny can be the reason because:
- I don't have this file
- Sometimes the ssh connection do work
- I run the same ssh/sshd configuration in XP and Vista without problems

br
Matthias
-- 
Don't Panic


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



read -t hangs sometimes with pipes

2009-06-20 Thread Matthias Meyer
Hi,

Sometimes pipes, created with mknod, seems not to be work fully correct.

Most of the time I can do:
mknod /var/run/CONT p
read -t 2 signal  /var/run/CONT.

After 2 seconds I receive a timeout and the read returns.
But sometimes the read will wait forever. And also if I write something
to /var/run/CONT, the read did not read it.

Furthermore I can not reset anything. I have to reboot the workstation
thats pipes works again.

Is there any posibility to reset something that pipes will work again
without reboot?

Thanks
Matthias
-- 
Don't Panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



howto obtain the used space of /cygdrive/c/System Volume Information

2009-05-01 Thread Matthias Meyer
Hi,

I backup Windows XP as well as Windows Vista by using rsyncd.
Thats working fine.
But I have a difference between the used space in source and destination.
Some of this differences are justified in my exclusions of pagefile.sys and
hiberfile.sys.
Another part, I am sure, by System Volume Information.

How to obtain the used space of /cygdrive/c/System Volume Information?
du returns:
du: cannot read directory `/cygdrive/c/System Volume Information':
Permission denied

br
Matthias
-- 
Don't Panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsyncd cannot access volume shadow copy

2009-05-01 Thread Matthias Meyer
Matthias Meyer wrote:

 Matthias Meyer wrote:
 
 Hi,
 
 I run cygwin in Vista:
 
 I can create a volume shadow copy with vshadow from the Microsoft SDK as
 well as map it to drive B:.
 
 I can access /cygdrive/b (bash) as well as B: (cmd) from terminals of the
 same user which has mapped the shadow copy to the drive.
 
 But I can not access the shadow copy from terminals of other users.
 
 AND my rsyncd, which runs under the same user where the shadow copy was
 mapped, can't access /cygdrive/b.
 
 rsync: chdir /cygdrive/b failed
 
 Any hint?
 Thanks
 Matthias
 I try the same under Windows XP and it works. But only one time.
 I map the drive with dosdev b: \\?\GLOBALROOT\Device...
 rsyncd works but has locked files
 2009/02/18 19:54:05 [2112] rsync: send_files failed to open Dokumente und
 Einstellungen/Administrator/Lokale
 Einstellungen/Anwendungsdaten/Microsoft/Windows/UsrClass.dat (in B):
 Device or resource busy (16)
 
 After dosdev -r -d b: and again dosdev b: \\?\GLOBALROOT\Device...
 I get from rsyncd:
 2009/02/18 20:03:19 [2580] name lookup failed for 127.0.0.1: Unknown
 server error
 2009/02/18 20:03:19 [2580] connect from UNKNOWN (127.0.0.1)
 2009/02/18 20:03:19 [2580] rsync: chdir /cygdrive/b failed
 : No such file or directory (2)
 
 In both cases ls -alh /cygdrive/b will list the content of drive c: (which
 is as expected)
 
 :-O
 Matthias

dosdev as well as rsyncd must be run in the same user account.
In addition rsyncd should not be startet by cygrunsrv. Also if cygrunsrv
starts rsyncd as the same user as dosdev runs, windows apparently sees
differences between them.
vshadow, on the other hand, can (and must) be started through schtasks in
the user account SYSTEM.

I've didn't try to start rsyncd by schtasks. Maybee that works too.

br
Matthias
-- 
Don't Panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: howto obtain the used space of /cygdrive/c/System Volume Information

2009-05-01 Thread Matthias Meyer
Dave Korn wrote:

 Matthias Meyer wrote:
 Hi,
 
 I backup Windows XP as well as Windows Vista by using rsyncd.
 Thats working fine.
 But I have a difference between the used space in source and destination.
 Some of this differences are justified in my exclusions of pagefile.sys
 and hiberfile.sys.
 Another part, I am sure, by System Volume Information.
 
 How to obtain the used space of /cygdrive/c/System Volume Information?
 du returns:
 du: cannot read directory `/cygdrive/c/System Volume Information':
 Permission denied
 
   I very seriously recommend never going anywhere near that directory nor
 touching it in any way.
 
 
 
 
 
 
 
 
 
 
   Still here?  OK, if you absolutely have to know, the simplest way is to
   give
 yourself read access through the security tab in the explorer properties
 (may
 need to take ownership to do that).  Then clear the properties dialog and
 bring it up again; this time, explorer will be able to size the folder.
 Immediately delete the access perms you gave yourself and pray you didn't
 break anything critical.
 
 cheers,
   DaveK

chmod u+rx /cygdrive/c/System Volume Information
du -h --max-depth=0 /cygdrive/c/System Volume Information
chmod u-rx /cygdrive/c/System Volume Information

Thanks
Matthias
-- 
Don't Panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsyncd cannot access volume shadow copy

2009-03-08 Thread Matthias Meyer
Matthias Meyer wrote:

 Hi,
 
 I run cygwin in Vista:
 
 I can create a volume shadow copy with vshadow from the Microsoft SDK as
 well as map it to drive B:.
 
 I can access /cygdrive/b (bash) as well as B: (cmd) from terminals of the
 same user which has mapped the shadow copy to the drive.
 
 But I can not access the shadow copy from terminals of other users.
 
 AND my rsyncd, which runs under the same user where the shadow copy was
 mapped, can't access /cygdrive/b.
 
 rsync: chdir /cygdrive/b failed
 
 Any hint?
 Thanks
 Matthias

Now I can access the volume shadow copy from rsyncd. But I have to start the
rsyncd from a terminal (remote ssh session). If I run it as a service by
cygrunsrv it can't access the volume shadow copy.
It is the same in XP and Vista as well as in Home or Professional/Business
versions.
I've double check that the cygrunsrv/rsyncd runs in the same user which call
the dosdev.
Is there some special rights or environment for processes runs as service?

br
Matthias
-- 
Don't Panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsyncd cannot access volume shadow copy

2009-02-18 Thread Matthias Meyer
Matthias Meyer wrote:

 Hi,
 
 I run cygwin in Vista:
 
 I can create a volume shadow copy with vshadow from the Microsoft SDK as
 well as map it to drive B:.
 
 I can access /cygdrive/b (bash) as well as B: (cmd) from terminals of the
 same user which has mapped the shadow copy to the drive.
 
 But I can not access the shadow copy from terminals of other users.
 
 AND my rsyncd, which runs under the same user where the shadow copy was
 mapped, can't access /cygdrive/b.
 
 rsync: chdir /cygdrive/b failed
 
 Any hint?
 Thanks
 Matthias
I try the same under Windows XP and it works. But only one time.
I map the drive with dosdev b: \\?\GLOBALROOT\Device...
rsyncd works but has locked files
2009/02/18 19:54:05 [2112] rsync: send_files failed to open Dokumente und
Einstellungen/Administrator/Lokale
Einstellungen/Anwendungsdaten/Microsoft/Windows/UsrClass.dat (in B):
Device or resource busy (16)

After dosdev -r -d b: and again dosdev b: \\?\GLOBALROOT\Device...
I get from rsyncd:
2009/02/18 20:03:19 [2580] name lookup failed for 127.0.0.1: Unknown server
error
2009/02/18 20:03:19 [2580] connect from UNKNOWN (127.0.0.1)
2009/02/18 20:03:19 [2580] rsync: chdir /cygdrive/b failed
: No such file or directory (2)

In both cases ls -alh /cygdrive/b will list the content of drive c: (which
is as expected)

:-O
Matthias
-- 
Don't Panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



rsyncd cannot access volume shadow copy

2009-02-18 Thread Matthias Meyer
Hi,

I run cygwin in Vista:

I can create a volume shadow copy with vshadow from the Microsoft SDK as
well as map it to drive B:.

I can access /cygdrive/b (bash) as well as B: (cmd) from terminals of the
same user which has mapped the shadow copy to the drive.

But I can not access the shadow copy from terminals of other users AND my 
rsyncd, which runs under the same user where the shadow copy was
mapped, can't access /cygdrive/b.

rsync: chdir /cygdrive/b failed

I try the same under Windows XP and it works only one time :-O
I map the drive with dosdev b: \\?\GLOBALROOT\Device...
rsyncd works but has locked files
2009/02/18 19:54:05 [2112] rsync: send_files failed to open Dokumente und
Einstellungen/Administrator/Lokale
Einstellungen/Anwendungsdaten/Microsoft/Windows/UsrClass.dat (in B):
Device or resource busy (16)

After dosdev -r -d b: and again dosdev b: \\?\GLOBALROOT\Device...
I get from rsyncd:
2009/02/18 20:03:19 [2580] name lookup failed for 127.0.0.1: Unknown server
error
2009/02/18 20:03:19 [2580] connect from UNKNOWN (127.0.0.1)
2009/02/18 20:03:19 [2580] rsync: chdir /cygdrive/b failed
: No such file or directory (2)

In both (XP) cases ls -alh /cygdrive/b will list the content of drive c: 

Matthias
-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsyncd cannot access volume shadow copy

2009-02-18 Thread Matthias Meyer
Am Mittwoch 18 Februar 2009 schrieb Larry Hall (Cygwin):
 Is there something of significance here that differs from
 http://cygwin.com/ml/cygwin/2009-02/msg00404.html?
 
 
 -- 
 Larry Hall  http://www.rfk.com
 RFK Partners, Inc.  (508) 893-9779 - RFK Office
 216 Dalton Rd.  (508) 893-9889 - FAX
 Holliston, MA 01746
 
No, is the same problem. But I found today two old threads around this 
problem in the mailgroup and I hope to find an answer here.

br
Matthias
-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsyncd cannot access volume shadow copy

2009-02-18 Thread Matthias Meyer
Am Mittwoch 18 Februar 2009 schrieb Matthias Meyer:
 Am Mittwoch 18 Februar 2009 schrieb Larry Hall (Cygwin):
  Is there something of significance here that differs from
  http://cygwin.com/ml/cygwin/2009-02/msg00404.html?
  
  
  -- 
  Larry Hall  http://www.rfk.com
  RFK Partners, Inc.  (508) 893-9779 - RFK Office
  216 Dalton Rd.  (508) 893-9889 - FAX
  Holliston, MA 01746
  
 No, is the same problem. But I found today two old threads around this 
 problem in the mailgroup and I hope to find an answer here.
 
 br
 Matthias
 -- 
 Don't Panic
 

and I didn't recognize that cygwin@cygwin.com is the same as 
gmane.os.cygwin.

I'm stupid ;-)
Sorry

-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



rsyncd cannot access volume shadow copy

2009-02-17 Thread Matthias Meyer
Hi,

I run cygwin in Vista:

I can create a volume shadow copy with vshadow from the Microsoft SDK as
well as map it to drive B:.

I can access /cygdrive/b (bash) as well as B: (cmd) from terminals of the
same user which has mapped the shadow copy to the drive.

But I can not access the shadow copy from terminals of other users.

AND my rsyncd, which runs under the same user where the shadow copy was
mapped, can't access /cygdrive/b.

rsync: chdir /cygdrive/b failed

Any hint?
Thanks
Matthias
-- 
Don't Panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



read file with windows filenames

2009-01-29 Thread Matthias Meyer
Hi,

I want to read filenames from a file and manipulate this files with the windows 
program attrib.
Not easy to find how to read windows filenames from a file without lost of \.
while IFS= read -r cLine
do
echo $cLine
done  restoreFiles.tmp

The above will work. BUT:

while IFS= read -r cLine
do
echo $cLine
attrib +H $cLine
done  restoreFiles.tmp
rm -f restoreFiles.tmp

will stop the while loop after the first call of attrib:

+ echo 'C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\Credentials\S-1-5-21-1606980848-1532298954-1801674531-500'
C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\Credentials\S-1-5-21-1606980848-1532298954-1801674531-500
+ attrib +S 'C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\Credentials\S-1-5-21-1606980848-1532298954-1801674531-500'
+ IFS=
+ read -r cLine
+ test 0 -gt 0
+ rm -f restoreFiles.tmp

Did anyone know what happens there?

Thanks for any hint
Matthias
-- 
Don't Panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: read file with windows filenames

2009-01-29 Thread Matthias Meyer
Tim McDaniel wrote:
 Given that the debug output has attrib +S but the code at top has
 attrib +H, and that the debug output has test 0 -gt 0 that the
 code doesn't have just before the loop exit, it is probably necessary
 for you to publish the actual code that's failing, even if it has
 details that you're 100% certain are irrelevant and unimportant.
 
Sorry !
The sourcecode (/etc/setAttribute):
#!/bin/sh
while read -r cLine
do
echo $cLine
attrib ${cLine%%:*} ${cLine#*:}
done  2restore4

The output:
$ sh -x /etc/setAttribute
+ read -r cLine
+ echo '+S:C:\Dokumente' und 
'Einstellungen\Administrator\Anwendungsdaten\Microsoft\Credentials\S-1-5-21-1606980848-1532298954-1801674531-500'
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\Credentials\S-1-5-21-1606980848-1532298954-1801674531-500
+ attrib +S 'C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\Credentials\S-1-5-21-1606980848-1532298954-1801674531-500'
+ read -r cLine
+ exit

attached you will find the file (2restore4) which I want read.
br
Matthias
-- 
Don't Panic
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\Credentials\S-1-5-21-1606980848-1532298954-1801674531-500
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\CryptnetUrlCache\Content\3C83474D61E624A4F9844DF935AFE217
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\CryptnetUrlCache\Content\E04822AD18D472EA5B582E6E6F8C6B9A
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\CryptnetUrlCache\MetaData\3C83474D61E624A4F9844DF935AFE217
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\CryptnetUrlCache\MetaData\E04822AD18D472EA5B582E6E6F8C6B9A
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\CryptnetUrlCache\Content
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\CryptnetUrlCache\MetaData
+S +H:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\Internet Explorer\Quick 
Launch\desktop.ini
+S +H:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\Internet 
Explorer\Desktop.htt
:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\Internet Explorer\Quick 
Launch
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\SystemCertificates\My\Certificates
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\SystemCertificates\My\CRLs
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\SystemCertificates\My\CTLs
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\SystemCertificates\My
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\Credentials
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\CryptnetUrlCache
+S:C:\Dokumente und 
Einstellungen\Administrator\Anwendungsdaten\Microsoft\SystemCertificates
+S:C:\Dokumente und Einstellungen\Administrator\Anwendungsdaten\Microsoft


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Re: read file with windows filenames

2009-01-29 Thread Matthias Meyer
Mark J. Reed wrote:

 For what it's worth, I've had intermittent problems with bash and
 while read loops where the loop aborts after one iteration whenever
 there's nontrivial code in the loop body, on multiple platforms, not
 just Cygwin.  So this might not be a Cygwin issue.  I've never been
 ble to isolate the problem enough to file a bug report, unfortunately.

Thanks to all.
The problem was a problem of this windows program attrib. /dev/null will
solve this problem. :-)

#!/bin/sh
while read -r cLine
do
echo $cLine
attrib ${cLine%%:*} ${cLine#*:}  /dev/null
done  2restore4

br
Matthias
-- 
Don't Panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: editrights - which permission is necessary to fork a process

2008-12-30 Thread Matthias Meyer
Matthias Meyer wrote:

 Hi,
 
 I want to use rsync's pre-xfer in Vista. Unfortunately it didn't work if I
 run the rsync daemon within in the system account.
 I would believe that theire are rights necessary which are not included in
 the system account. Nearly the same as I found in ssh-host-config for
 privilege separation.
 
 Did anybody knows which right(s) is/are necessary to fork a subprocess?
 Or someone knows where I can find a documentation of the rights which be
 provided by the editrights.exe program?
 
 Thanks in advance
 Matthias

No rights are necessary. I tried it all :-(
The only way to run rsync with pre/post xfer in Vista is:
- install sshd
- run rsyncd as a windows service under an own user
- ssh from another machine into this user. If you want you can log out
immediatly. But an ssh ... whoami isn't enough.
- connect to the rsyncd an run your backup.

I do not understand why this ssh login is necessary or where my mistake.
br
Matthias
-- 
Don't Panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



how to backup/restore of windows file attributes

2008-12-29 Thread Matthias Meyer
I use rsync for backing up windows.
After a restore of Desktop.ini I recognize that the hidden attribut and the
system attribut will not been restored.

I know, this are no unix attributes. But is there a way to backup and
restore the windows attributes too?

Thanks
Matthias
-- 
Don't Panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsync restore the file owner but rsyncd do it not

2008-12-28 Thread Matthias Meyer
Matthias Meyer wrote:

 :-) Yes it works!
 
 Three important things are going wrong in my past:
 1. /etc/passwd as well as /etc/group are necessary in windows to enable
   cygwin to map windows SID/GID to posix uid/gid.
 2. --numeric-ids are necessary during backup to server if the client
 uid/gid
   is unknown there (whats probably the case) . During restore
   --numeric-ids are not necessary because uid/gid should be known on
   client side.
 3. The environment variable must be CYGWIN=ntsec, which is already the
   default.
4. The account, where the rsync daemon runs, must be in the administrator group
5. The Server must set the parameter --super as restore parameter
 
 Hopefully my summary above help other users :-)
 
 Thanks
 Matthias

-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: pre-xfer exec works in XP but not in Vista

2008-12-25 Thread Matthias Meyer
Matthias Meyer wrote:

 Matthias Meyer wrote:
 
 Hi,
 
 I try to use exact the same procedures within XP and Vista.
 Linux-Server with backuppc, Windows-Clients with cygwin and rsyncd V3.0.4
 over OpenSSH V5.1p1 for backup.
 This will work with XP but unfortunately not with Vista (Home Basic) :-(
 
 In Vista I get the following error from rsyncd:
 pre-xfer exec returned failure (65280)
 rsync error: requested action not supported (code 4)
 
 and Vista pops up a small windows with the message:
 sh.exe would be finished and closed.
 The application is not any longer running correctly due to a problem.
 (sorry, thats my translation from german into english ;-)
 
 But sh /etc/Backup/pre-exec.sh from an vista cmd box works correct.
 
 Excerpt from my rsyncd.conf:
 -
 max connections = 6
 log file = /var/log/backup-service.log
 read only = false
 write only = false
 transfer logging = no
 list = false
 max verbosity = 6
 address = 127.0.0.1
 pre-xfer exec = /etc/Backup/pre-exec.sh
 post-xfer exec = /etc/Backup/post-exec.sh
 [C]
 path = /cygdrive/c/
 -
 
 My pre-exec.sh:
 -
 /bin/ManageSuspend.exe OFF
 exit 0
 -
 
 Thanks for any hint
 Matthias
 
 Nobody runs pre-xfer exec within Vista?
 
Solved:
The owner of the rsyncd process (normally system) need execute permissions
on /etc/Backup/pre-exec.sh and /etc/Backup/post-exec.sh
Therefore:
 chgrp system /etc/Backup/pre-exec.sh
 chmod g+x /etc/Backup/pre-exec.sh
is necessary for both scripts.

br
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



editrights - which permission is necessary to fork a process

2008-12-22 Thread Matthias Meyer
Hi,

I want to use rsync's pre-xfer in Vista. Unfortunately it didn't work if I
run the rsync daemon within in the system account.
I would believe that theire are rights necessary which are not included in
the system account. Nearly the same as I found in ssh-host-config for
privilege separation.

Did anybody knows which right(s) is/are necessary to fork a subprocess?
Or someone knows where I can find a documentation of the rights which be
provided by the editrights.exe program?

Thanks in advance
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



sshd can not be stopped

2008-12-13 Thread Matthias Meyer
Hi,

I've installed a sshd service by:
cygrunsrv -I sshd -t auto -y tcpip -O -p /bin/sshd
and it work.
But I can not stopp the service.
cygrunsrv -E sshd
seems to work but sshd stay in the Windows process list (Task Manager).
In adition I can not start the service again. If I kill the sshd process
than I can start the service again.

br
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: pre-xfer exec works in XP but not in Vista

2008-12-12 Thread Matthias Meyer
Matthias Meyer wrote:

 Hi,
 
 I try to use exact the same procedures within XP and Vista.
 Linux-Server with backuppc, Windows-Clients with cygwin and rsyncd V3.0.4
 over OpenSSH V5.1p1 for backup.
 This will work with XP but unfortunately not with Vista (Home Basic) :-(
 
 In Vista I get the following error from rsyncd:
 pre-xfer exec returned failure (65280)
 rsync error: requested action not supported (code 4)
 
 and Vista pops up a small windows with the message:
 sh.exe would be finished and closed.
 The application is not any longer running correctly due to a problem.
 (sorry, thats my translation from german into english ;-)
 
 But sh /etc/Backup/pre-exec.sh from an vista cmd box works correct.
 
 Excerpt from my rsyncd.conf:
 -
 max connections = 6
 log file = /var/log/backup-service.log
 read only = false
 write only = false
 transfer logging = no
 list = false
 max verbosity = 6
 address = 127.0.0.1
 pre-xfer exec = /etc/Backup/pre-exec.sh
 post-xfer exec = /etc/Backup/post-exec.sh
 [C]
 path = /cygdrive/c/
 -
 
 My pre-exec.sh:
 -
 /bin/ManageSuspend.exe OFF
 exit 0
 -
 
 Thanks for any hint
 Matthias

Nobody runs pre-xfer exec within Vista?

-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsync restore the file owner but rsyncd do it not

2008-12-10 Thread Matthias Meyer
Christopher Faylor wrote:

 On Mon, Dec 08, 2008 at 11:47:51AM -0500, Christopher Faylor wrote:
On Mon, Dec 08, 2008 at 04:51:29PM +0100, Matthias Meyer wrote:
:-) Yes it works!

Three important things are going wrong in my past:
1. /etc/passwd as well as /etc/group are necessary in windows to enable
  cygwin to map windows SID/GID to posix uid/gid.
2. --numeric-ids are necessary during backup to server if the client
uid/gid
  is unknown there (whats probably the case) . During restore
  --numeric-ids are not necessary because uid/gid should be known on
  client side.
3. The environment variable must be CYGWIN=ntsec, which is already the
  default.

Hopefully my summary above help other users :-)

The phrase must be...which is already the default does not make logical
sense.
 
 Perhaps you meant to imply that CYGWIN=nontsec should not be used but if
 you are going to go down this road then you might have to prove that a few
 other no... options should not be used either.
 
 I think the basic advice is actually Don't randomly change CYGWIN
 settings in an attemp to fix a problem unless you understand what they do
 or have been instructed to change them by someone who understands what
 they do.
 
 cgf

Thanks for your remark.
Where are you as I had my problem? ;-)
If you search, like I did, through the mailing groups to find a solution,
you would find several hints. Among other things also CYGWIN=nontsec.

br
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsync restore the file owner but rsyncd do it not

2008-12-08 Thread Matthias Meyer
:-) Yes it works!

Three important things are going wrong in my past:
1. /etc/passwd as well as /etc/group are necessary in windows to enable
  cygwin to map windows SID/GID to posix uid/gid.
2. --numeric-ids are necessary during backup to server if the client uid/gid
  is unknown there (whats probably the case) . During restore --numeric-ids
  are not necessary because uid/gid should be known on client side.
3. The environment variable must be CYGWIN=ntsec, which is already the
  default.

Hopefully my summary above help other users :-)

Thanks
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: all files seems to be owned by the actual user

2008-12-07 Thread Matthias Meyer
Brian Dessent wrote:

 Matthias Meyer wrote:
 
 Another strangely effect is that ls -alnh / lists all files as owned by
 the actual user.
 If I do that as another user the files will also be listet as owned by
 him, the user who runs the ls.
 
 What is the reason for that?
 
 You instructed Cygwin to not read or write any ACLs by setting nontsec.
 It has to fill in those fields with something so it just lists whatever
 the current user is as the owner (just as it would have had to do with a
 filesystem like FAT or an OS like Win95 that doesn't record an owner.)
 
 Is there a possibility to backup the files from different users (e.g.
 with rsync) and restore them with the same owner and permissions which
 they have at backup time?
 
 Certainly not with nontsec in effect.
 
 Brian
Thanks,
I've tried also ntsec, binmode and .
All of this three list the true file owner with ls -anlh.
But as before, rsync -a create the files with the user who runs the rsync
command. Also rsync -aA with or without --numeric-ids have this behaviour.

I would believe that I have a very stupid failure. I can not believe that it
is not possible to backup and restore the file owner.

-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: all files seems to be owned by the actual user

2008-12-07 Thread Matthias Meyer
Brian Dessent wrote:

 Matthias Meyer wrote:
 
 I've tried also ntsec, binmode and .
 
 Why are you doing these things?  Are you following somebody's guide?
 Please tell them that they are spreading useless information if that is
 the case.  ntsec is the default.  binmode is the default and is
 irrelevant for files anyway.  So  is the same as ntsec binmode, and
 you should not need to set CYGWIN at all in general unless there is a
 *specific* reason that calls for it.
 
 All of this three list the true file owner with ls -anlh.
 But as before, rsync -a create the files with the user who runs the rsync
 command. Also rsync -aA with or without --numeric-ids have this
 behaviour.
 
 I would believe that I have a very stupid failure. I can not believe that
 it is not possible to backup and restore the file owner.
 
 rsync only tries to set the owner when it thinks it has the privilege to
 do so -- on most POSIX systems this means being the superuser, uid=0.
 This check in rsync is less than useful on Cygwin where privileges work
 differently.  Thankfully they provide an override in the form of the
 --super switch.
 
 Brian

Thanks Brian,
Maybee I am a little bit helpless ;-)
Please can you say what I have to do?
Should rsync -a --super /cygdrive/c/data /cygdrive/c/backup do the job what
I want?

Is there a possibility to backup the files from different users (e.g. with
rsync) and restore them with the same owner and permissions which they have
at backup time?

Thanks in advance
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: RSync random failures

2008-12-07 Thread Matthias Meyer
Allan Schrum wrote:
 
 Hi Matthias,
 
 The problem is when rsync is not actively connected to a client. When
 started as a service, an instance of rsync is running listening for
 connections. When the connection occurs, the transfer takes place.
 Afterwards, the original instance remains still listening for connections.
 When running as a service waiting for a connection, something happens to
 it which causes it to fail and exit without cleaning up. This leaves a PID
 file which blocks all restart attempts. I then must manually clean up the
 PID file to allow the service to restart. Obviously, leaving the PID file
 should not take place which is the symptom of the true problem.
 
 Something is causing rsync to fail without cleaning up the PID file.
 Sometimes it is a reboot (most often due to that). Sometimes during a
 transfer it will fail and not cleanup properly. I have not yet figured
 this out and was hoping others saw this as well.
 
 I did notice that while debugging (with gdb) rsync that if I type Ctrl-C
 that the task stops without cleaning up. However, I'm not sure if that is
 due to how gdb works, or something else.
 
 Again, this is with rsync-3.0.4-1. This cleanup problem did not exist with
 rsync-2.6.9-2. As a temporary solution, I am back to the older rsync on
 most of my machines until we get this current problem resolved.
 
 Thanks,
 
 -Allan

Hi Allen,

I didn't understand your problem.
You didn't need this PID file. Simply remove the line
pid file = 
from your rsyncd.conf

br
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



rsync restore the file owner but rsyncd do it not

2008-12-07 Thread Matthias Meyer
Hi all,

I want use rsync to backup a windows XP professional client to my linux server.
I've installed cygwin/rsync on windows and start with a local windows backup.

rsync -aA --super /cygdrive/c/bootfont.bin /cygdrive/c/backup
copies the file, but only the attributes RA and not the original RHSA.
rsync -aA --super /cygdrive/c/backup/bootfont.bin /cygdrive/c/data
restore the file as it was backed up. With the attributes RA

My first questions:
What the reason for not copying the attributes HS?
If I try -X I get an error rsync: extended attributes are not supported on 
this client

Than I install rsync as a windows service:
cygrunsrv -I rsyncd -e -n -t auto -p /bin/rsync -a --daemon --no-detach 
--config=/etc/rsyncd.conf
cygrunsrv -S rsyncd

...and try a local backup:
rsync -aA --super localhost::BACKUP/bootfont.bin /cygdrive/c/backup
copies the file, but also only the attributes RA and not the original RHSA.
and the appropriate restore:
rsync -aA --super /cygdrive/c/backup/bootfont.bin localhost::BACKUP
rsync: chown .bootfont.bin.KYyS5D (in BACKUP) failed: Invalid argument (22)

and the file will be restored with the owner of the rsyncd process:
ls -al shows - SYSTEM 
ls -an shows - 18 4294967295

bootfont.bin is originaly owned by:
ls -al shows - Administratoren  (german XP ;-))
ls -an shows - 544 4294967295

The same behavior occurs with a file test.txt which is owned by:
ls -al shows - user mkgroup
ls -an shows - 1006 513

What is going wrong?
Thanks
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: rsync restore the file owner but rsyncd do it not

2008-12-07 Thread Matthias Meyer
Brian Dessent wrote:

 Matthias Meyer wrote:
 
 My first questions:
 What the reason for not copying the attributes HS?
 
 rsync is a POSIX program.  It sees everything in terms of POSIX.  That
 means it sees a file mode, such as 0644, 0755, etc.  It reads a mode on
 the source and sets that same mode on the dest, that is it.  It has no
 idea what H/S/R/A attributes mean or that they even exist.
 
 The A attribute gets set on the dest file simply because that is the
 default behavior when creating a file.  The R attribute gets set because
 Cygwin can map that bit easily onto the POSIX u=w mode bit, such that
 setting a mode like 0444 will cause R to be set and setting 0644 will
 cause R to be reset.  But S and H have no such easy mapping onto POSIX
 modes, so they aren't propagated.
 
 If I try -X I get an error rsync: extended attributes are not
 supported on this client
 
 Any EA support in rsync would most likely be some form of POSIX EA
 anyway, not R/H/S/A, so I don't think this really matters.
 
 The same behavior occurs with a file test.txt which is owned by:
 ls -al shows - user mkgroup
 ls -an shows - 1006 513
 
 http://cygwin.com/faq/faq-nochunks.html#faq.using.chmod
 
 Brian

Thanks Brian!

It seems I had run bin\mkgroup -l  etc\passwd instead bin\mkgroup -l 
etc\group.
Now it works.
It seems that rsync (or cygwin) set the process-owner as file-owner if it
can not find the uid/gid within /etc/passwd and /etc/group.

Now I will try the game from windows client to linux server and return.

br
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



all files seems to be owned by the actual user

2008-12-06 Thread Matthias Meyer
Hi,

I define CYGWIN=nontsec as global environment variable. After reboot I
install the cygwin-setup-2.602.exe. I only add rsync to the pre selected
modules.
Then I logged in into the cygwin bash (by using the icon on the desktop)
There I tried rsync -a /cygdrive/c/work /cygdrive/c/backup
All files in /cygdrive/c/backup will be owned by the user who runs the
rsync. But the source files in /cygdrive/c/work are owned by another user!

Another strangely effect is that ls -alnh / lists all files as owned by
the actual user.
If I do that as another user the files will also be listet as owned by him,
the user who runs the ls.

What is the reason for that?

Is there a possibility to backup the files from different users (e.g. with
rsync) and restore them with the same owner and permissions which they have
at backup time?

Thanks
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: NT-Authority/System will be file owner after rsync restore

2008-12-02 Thread Matthias Meyer
Larry Hall (Cygwin) wrote:

 Matthias Meyer wrote:
 
 create a new file /etc/test.txt
 binls -alh /etc/test.txt
 bin-rwx--+ 1 meyer Kein 0 Dec  1 23:01 /etc/test.txt
 
 Than I run a backup:
 After that my backup-protocol shows:
   create   64418/544   0 etc/Test.txt
 
 But 18/544 is SYSTEM:Administratoren
 as /etc/passwd - SYSTEM:*:18:544:,S-1-5-18::
 and /etc/group - Administratoren:S-1-5-32-544:544:
 shows.
 
 I've tried this with both, cygrunsrv -I backup ... as well as
 with cygrunsrv -I backup -e CYGWIN=nontsec ...
 
 Any further hint?
 
 Well services on = XP run under the local system account so I'm
 guessing that your backup service is using the permissions of the
 creator of the backup files rather than the original permissions.
 'rsync', according to the man page, says that it has '-p' and
 '-A' flags to preserve the original permission IDs (or '-a' which
 includes '-p').  Are you using any of these?
 
--archive == -rlptgoD
(--recursive, --links, --perms, --times, --group, --owner, -D)
I use all of them in both, by backup as well as by restore.

br
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: NT-Authority/System will be file owner after rsync restore

2008-12-01 Thread Matthias Meyer
Larry Hall (Cygwin) wrote:
 
 Could be.  I don't know much about rsync.  However, if that is the
 uid/gid, it maps to -1 (don't know why it's represented as a 32-bit value
 though.) Anyway, if you and I are right, then my WAG is that your
 '/etc/passwd' and/or '/etc/group' file(s) are wrong.
 See http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-ids for more
 details on Cygwin special IDs.
 
Thanks Larry,

One step to the goal ;-)

I lost my /etc/passwd and /etc/group. Do not know why :-(
I create new ones with:
binmkpasswd -l  /etc/passwd
binmkpasswd -g  /etc/group

create a new file /etc/test.txt
binls -alh /etc/test.txt
bin-rwx--+ 1 meyer Kein 0 Dec  1 23:01 /etc/test.txt

Than I run a backup:
After that my backup-protocol shows:
  create   64418/544   0 etc/Test.txt

But 18/544 is SYSTEM:Administratoren
as /etc/passwd - SYSTEM:*:18:544:,S-1-5-18::
and /etc/group - Administratoren:S-1-5-32-544:544:
shows.

I've tried this with both, cygrunsrv -I backup ... as well as
with cygrunsrv -I backup -e CYGWIN=nontsec ...

Any further hint?
Thanks
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: RSync random failures

2008-12-01 Thread Matthias Meyer
Allan Schrum wrote:

In the event log the following message was found:
 
rsyncd: PID 1800: rsync error: error in file IO (code 11) at
/home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/clientserver.c(985)
[receiver=3.0.4].
 
 I downloaded the source, rebuilt and I am running under the debugger. The
 line indicated above is where RSync discovers that the PID file already
 exists. While that specific problem is solved by deleting the PID file,
 the problem is that the PID file should never exist after RSync exits.
 
 There is some condition that leaves the PID file when RSync shuts down (as
 a service under Windows XP) normally. This problem did not exist in the
 previous version (2.6.9-2).
 
 I have tried hibernation, stand-by, shutdown  restart, network
 disconnections, various signals passed, etc., and nothing reliably causes
 the problem to manifest itself. But any of these methods has caused the
 problem. It seems to happen more frequently during shutdown  restart than
 any other method.
 
 Any ideas on how to debug? Anyone else have this problem?
 
 Thanks,
 
 -Allan

Hi Allan,

I did not use a PID file. Because that my rsync did not have a problem with
that.
Maybee you did not use a PID file?

Because of your hibernation/stand-by tests. Did you know if it is possible
to disable hibernation/stand-by during rsync is running?

br
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



NT-Authority/System will be file owner after rsync restore

2008-11-30 Thread Matthias Meyer
Hi,

I try to backup WindowsXP as well as Vista to an Linux server.
I use backuppc as backup-server, cygwin as client environment and rsync for
transport.
The backup seems to work well but the restore not. The restored files will
have NT-Authority/System as new owner, independend from their old owner
or if the file not exist before restore.
My rsyncd.conf:
 max connections = 6
 log file = /var/log/backup-service.log
 read only = false
 write only = false
 transfer logging = no
 list = false
 max verbosity = 6
 address = 127.0.0.1

[C]
 path = /cygdrive/c/

The rsync arguments by backup (extracted from backuppc logfile):
Sending args:
--server --sender --numeric-ids --perms --owner --group -D
--links --hard-links --times --block-size=2048 --recursive --one-file-system 
--bwlimit=512

The rsync logfile from restore (extracted from backuppc logfile):
Sending args:
--server --numeric-ids --perms --super --owner --group -D
--links --hard-links --times --block-size=2048 --relative --ignore-times 
--recursive
C/etc/
Sending /etc/account.sav (remote=/account.sav) type = 0
  restore   700 4294967295/4294967295  47 /etc/account.sav
Done: 1 files, 47 bytes

Maybee the error based on the backup because
The rsync logfile from backupextracted from backuppc logfile):
Connected to module C
Sending args:
--server --sender --numeric-ids --perms --super --owner --group -D
--links --hard-links --times --block-size=2048 --recursive --one-file-system 
--bwlimit=512 -vv
--ignore-times
 pool 700 4294967295/4294967295  47 etc/account.sav

I would believe that 4294967295/4294967295 is the uid/gid.

Thanks in advance
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Help needed: first time tried sshd and got stuck not far from the beginning...

2008-11-29 Thread Matthias Meyer
stevench2000 wrote:

 
 Hi, good day.
 
 my systme is vista 32bit
 as Admin, I downloaded the sshd packages and installed them
 - opened cygwin bash as administrator
 - ran ssh-host-config -y and accepted overwriting to /etc/sshd_config and
 /etc/inetd.d/sshd-inetd when asked
 - ran ssh-user-config -y and used empty passphrase
 - checked permissions on both /var/empty and /var/log/sshd.log, both of
 them belongs to the sshd owner (syg_server) and only writable to its owner
 - enable port 22 in Windows firewall for passing through
 - ran net start ssh:
 The CYGWIN sshd service is starting.
 The CYGWIN sshd service was started successfully.
 
 Everything seems okay at this point... but after that I cannot ssh to my
 localhost:
 $ ssh localhost -vvv
 OpenSSH_5.1p1, OpenSSL 0.9.8i 15 Sep 2008
 debug1: Reading configuration data /etc/ssh_config
 debug2: ssh_connect: needpriv 0
 debug1: Connecting to localhost [127.0.0.1] port 22.
 debug1: Connection established.
 debug1: identity file /home/Admin/.ssh/identity type 0
 debug3: Not a RSA1 key file /home/Admin/.ssh/id_rsa.
 debug2: key_type_from_name: unknown key type '-BEGIN'
 debug3: key_read: missing keytype
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug2: key_type_from_name: unknown key type '-END'
 debug3: key_read: missing keytype
 debug1: identity file /home/Admin/.ssh/id_rsa type 1
 debug3: Not a RSA1 key file /home/Admin/.ssh/id_dsa.
 debug2: key_type_from_name: unknown key type '-BEGIN'
 debug3: key_read: missing keytype
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug3: key_read: missing whitespace
 debug2: key_type_from_name: unknown key type '-END'
 debug3: key_read: missing keytype
 debug1: identity file /home/Admin/.ssh/id_dsa type 2
 ssh_exchange_identification: Connection closed by remote host
 
 /var/log/sshd.log is empty and /etc/sshd_config doesn't seem to have
 anything out of ordinary.
 Can anyone please suggest some helps?
 Thanks in advance!
 
 
 Regards,
 Steve
 
Hi Steve,

Did you really want ssh from your local Vista to your local Vista?
If yes, than the following pathes are a little different ;-)

Please go to your server and run /usr/sbin/sshd -ddd -D
Maybee your ssh-server say something about the reason.

You can also check your /etc/ssh/sshd_config which authentications are
allowed.
Especially 
RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication yes (which seems to be set no in your
configuration?)
Did you have public/private key in /home/Admin/.ssh?
Did you put your public key into /home/Admin/.ssh/authorized_keys?

good luck
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



pre-xfer exec works in XP but not in Vista

2008-11-29 Thread Matthias Meyer
Hi,

I try to use exact the same procedures within XP and Vista.
Linux-Server with backuppc, Windows-Clients with cygwin and rsyncd V3.0.4
over OpenSSH V5.1p1 for backup.
This will work with XP but unfortunately not with Vista (Home Basic) :-(

In Vista I get the following error from rsyncd:
pre-xfer exec returned failure (65280)
rsync error: requested action not supported (code 4)

and Vista pops up a small windows with the message:
sh.exe would be finished and closed.
The application is not any longer running correctly due to a problem.
(sorry, thats my translation from german into english ;-)

But sh /etc/Backup/pre-exec.sh from an vista cmd box works correct.

Excerpt from my rsyncd.conf:
-
 max connections = 6
 log file = /var/log/backup-service.log
 read only = false
 write only = false
 transfer logging = no
 list = false
 max verbosity = 6
 address = 127.0.0.1
 pre-xfer exec = /etc/Backup/pre-exec.sh
 post-xfer exec = /etc/Backup/post-exec.sh
[C]
 path = /cygdrive/c/
-

My pre-exec.sh:
-
/bin/ManageSuspend.exe OFF
exit 0
-

Thanks for any hint
Matthias
-- 
Don't panic


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: howto use rsyncs pre-xfer command?

2008-11-18 Thread Matthias Meyer
Am Sonntag 16 November 2008 schrieb Matthias Meyer:
 Hi,
 
 I want to disable windows suspend before starting backup by rsync.
 My rsyncd.conf:
 -
  max connections = 6
  log file = /var/log/backup-service.log
  read only = false
  write only = false
  transfer logging = no
  list = false
  max verbosity = 6
  pre-xfer exec = powercfg /H off
 
 [C]
  path = /cygdrive/c/
 [D]
  path = /cygdrive/d/
 -
 
 Unfortunately that didn't work. I get an error:
 pre-xfer exec returned failure (256)
 rsync error: requested action not supported (code 4)
 
 I use rsync V3.0.4 from cygwin in Windows clients and backuppc on server 
 side.
 
 Thanks for any hint
 Matthias
 -- 
 Don't Panic
 
 --
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 Problem reports:   http://cygwin.com/problems.html
 Documentation: http://cygwin.com/docs.html
 FAQ:   http://cygwin.com/faq/
 
Have a look at a relevant cwrsync FAQ - How can I make pre-exec and
post-exec work ? 

http://www.itefix.no/i2/node/11306

-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



How to disable suspend/hibernate in Windows

2008-11-18 Thread Matthias Meyer
Hi,

My Backup by rsync will abort if windows client enter suspend or hibernation 
mode.
How to disable that at begin of the backup and enable the client 
configuraton at the end of the backup again?
I've tried the registry setting:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ACPI\Parameters]
Attributes=dword:0070
but it did not work?

Thanks in advance
Matthias
-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



howto use rsyncs pre-xfer command?

2008-11-16 Thread Matthias Meyer
Hi,

I want to disable windows suspend before starting backup by rsync.
My rsyncd.conf:
-
 max connections = 6
 log file = /var/log/backup-service.log
 read only = false
 write only = false
 transfer logging = no
 list = false
 max verbosity = 6
 pre-xfer exec = powercfg /H off

[C]
 path = /cygdrive/c/
[D]
 path = /cygdrive/d/
-

Unfortunately that didn't work. I get an error:
pre-xfer exec returned failure (256)
rsync error: requested action not supported (code 4)

I use rsync V3.0.4 from cygwin in Windows clients and backuppc on server 
side.

Thanks for any hint
Matthias
-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



rsync Vista Client to Linux Server - readlink_stat - file name too long

2008-10-27 Thread Matthias Meyer
Hi,

I've installed cygwin and rsync/ssh on a vista client and want backup it to 
backuppc 3.1.0-2 on my Linux server:

On client side (vista) I use rsync 3.0.4 (protocol version 30)
Capabilities:
64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, no IPv6, batchfiles, inplace,
append, ACLs, no xattrs, iconv, symtimes
On server side (linux) I have rsync 3.0.3 (protocol version 30)
Capabilities:
64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes

In the logfile on Client side I found tons of messages like:

2008/10/27 21:36:02 [2327] rsync: readlink_stat(/Dokumente und 
Einstellungen/All Users/Application Data/Anwendungsdaten/Application 
Data/Anwendungsdaten/Anwendungsdaten/Application Data/Application 
Data/Application Data/Application Data/Application 
Data/Anwendungsdaten/Application Data/Start Menu/Programme (in C)) failed: 
File name too long (91)

In the server logfile I see:
full backup started for directory C (baseline backup #8)
Connected to Loredana.mybackup:10025, remote version 30
Negotiated protocol version 28
Connected to module C
Sending 
args: --server --sender --numeric-ids --perms --owner --group -D --links 
--hard-links --times --block-size=2048 --recursive --one-file-system 
--bwlimit=2840 --ignore-times . .
Checksum seed is 1224438319
Got checksumSeed 0x48fb722f
Sent exclude: /System Volume Information
 :

What can I do? Is there a bug/feature with Vistas file links?

Thanks in advance
Matthias
-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygrunsrv do not automatic start service

2008-07-19 Thread Matthias Meyer
Am Donnerstag 17 Juli 2008 schrieb René Berber:
 Matthias Meyer wrote:
 
  I've installed (cygrunsrv -I) a ssh tunnel with:
  /usr/bin/autossh -M 0 -o ServerAliveInterval=20 -o 
  ServerAliveCountMax=3 -N -C -i /etc/.ssh/id_rsa -L 389:localhost:389 
  [EMAIL PROTECTED]
  
  Unfortunatly this tunnel will not startet at boot time.
  If I start the service with cygrunsrv -S it will run.
  
  Any hint?
 
 Several:
 
 - Did you add the environment string required (AUTOSSH_NTSERVICE)?
 - Did you add a dependency to the network? (not required but it makes 
 sense);
 - Did you install the service to run as your account? (OpenSSH refuses 
 to run if the access to the keys is too lax, or if it has no access as 
 in other users don't have access to your keys).
 
 The command line I used for installation is (with obfuscated password of 
 course):
 
 $ cygrunsrv --install autossh --path /usr/bin/autossh --env 
 AUTOSSH_NTSERVICE=yes --args -M 0 -F /etc/autossh/ssh_config.remote 
 [EMAIL PROTECTED] --user rberber --passwd SECRET -y tcpip
 
 The configuration file, ssh_config.remote has all the options for ssh:
 
 $ cat /etc/autossh/ssh_config.legosoft 
  Host example.com 
   AddressFamily inet
 BatchMode yes
 #BindAddress 127.0.0.1
 CheckHostIP no
 Compression yes
 LocalForward localhost: sunfire:
 Protocol 2
 TCPKeepAlive yes
 
 I found that using other options, like User, IdentityFile, 
 UserKnownHostsFile, and HostName made the whole tunnel fail, I really 
 don't know why, I didn't experiment further.
 -- 
 René Berber
 

If I start the service with cygrunsrv -S or from Windows-GUI 
(Administrative Tools, Services) it will run. Therefore I dont believe 
that the parameters or configuration are not ok.

Matthias
-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygrunsrv do not automatic start service

2008-07-19 Thread Matthias Meyer
Am Donnerstag 17 Juli 2008 schrieb Larry Hall (Cygwin):
 Matthias Meyer wrote:
  Hello,
  
  I've installed (cygrunsrv -I) a ssh tunnel with:
  /usr/bin/autossh -M 0 -o ServerAliveInterval=20 -o 
  ServerAliveCountMax=3 -N -C -i /etc/.ssh/id_rsa -L 389:localhost:389 
  [EMAIL PROTECTED]
  
  Unfortunatly this tunnel will not startet at boot time.
  If I start the service with cygrunsrv -S it will run.
  
  Any hint?
 
 You should get this by default.  Check your service under
 Administrative Tools then Services to see if it is set to
 Auto.  If not, you can try to force it with --type auto.
 
 -- 
 Larry Hall  http://www.rfk.com
 RFK Partners, Inc.  (508) 893-9779 - RFK Office
 216 Dalton Rd.  (508) 893-9889 - FAX
 Holliston, MA 01746

It is set as --type auto.
I found in the logfile of the service (/var/log/forward389.log) a message 
that the hostname (server.at) can not be resolved.
Maybee the network connection has not be finished at the time my service 
will be startet.
It seems that windows do not restart the service after this failure.
Is it possible to start my service after network connection is 'up and 
running' or to restart my service after a failure.

Thanks
Matthias

-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygrunsrv do not automatic start service

2008-07-19 Thread Matthias Meyer
Am Samstag 19 Juli 2008 schrieb Brian Dessent:
 Matthias Meyer wrote:
 
  Is it possible to start my service after network connection is 'up and
  running' or to restart my service after a failure.
 
 Please read the replies that you have already received, specifically the
 one where René suggested that you configure the service with a
 dependency on the network (-y tcpip).
 
 Brian
 

I don't recognize the option -y tcpip.
Now I try it but it do not work for me.
In Windows (Administrative Tools then Services) I found the dependencie 
to Service TCP/IP Protokolltreiber but no running service with that name.
I will try with other services (DHCP-CLient and/or DNS-Client) and tell you 
about (un)success.

Thanks so far
Matthias
-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



cygrunsrv do not automatic start service

2008-07-16 Thread Matthias Meyer
Hello,

I've installed (cygrunsrv -I) a ssh tunnel with:
/usr/bin/autossh -M 0 -o ServerAliveInterval=20 -o 
ServerAliveCountMax=3 -N -C -i /etc/.ssh/id_rsa -L 389:localhost:389 
[EMAIL PROTECTED]

Unfortunatly this tunnel will not startet at boot time.
If I start the service with cygrunsrv -S it will run.

Any hint?

Thanks
Matthias
-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: start ssh port forwarding at boot time

2008-06-16 Thread Matthias Meyer
Am Montag 16 Juni 2008 schrieb René Berber:
 Matthias Meyer wrote:
 
 [snip]
  $ cygrunsrv -I forward -p /usr/bin/ssh -a -v -f -2 -N -L 
5729:localhost:5729 [EMAIL PROTECTED] -u root -w password
  $ cygrunsrv -S forward
  cygrunsrv: Error starting a service: StartService:  Win32 error 1069:
  Der Dienst konnte wegen einer fehlerhaften Anmeldung nicht gestartet 
werden.
  
  which means in english:
  The service could not be started because of an incorrect registration.
  But I'm sure. Username and password are correct.
 
 User means Windows user, not root.
 
 Actually there is another way to do the same, instead of running the 
 service as your Windows user (the one that has ~/.ssh/the keys), you 
 can pass the -i /path/to/your/home/.ssh/id_dsa (or id_rsa) to ssh.
 
 Snippet from man ssh:
 
   -i identity_file
   Selects a file from which the identity (private key) for 
 

Thanks René
This as well as:
ln -fs /home/root/.ssh/known_hosts /etc/ssh_known_hosts
Now it is running!

I will try autossh, as recommended by Andrew.

Thanks again
Matthias

-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



start ssh port forwarding at boot time

2008-06-15 Thread Matthias Meyer
Hello,

I try to start port forwarding shortly after boot by using cygrunsrv.

$ cygrunsrv -Q forward5729
Service : forward5729
Current State   : Stopped
Command : /usr/bin/ssh -v -f -2 -N -L 5729:localhost:5729 [EMAIL 
PROTECTED]

Unfortunately this will not work for me:

[EMAIL PROTECTED] ~
$ tail /var/log/forward5729.log
:
debug1: Connection established.
debug1: identity file /.ssh/id_rsa type -1
debug1: identity file /.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server-client aes128-cbc hmac-md5 none
debug1: kex: client-server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(102410248192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: read_passphrase: can't open /dev/tty: No such device or address
Host key verification failed.

If I start it in a terminal, it will work:
[EMAIL PROTECTED] ~
$ /usr/bin/ssh -v -f -2 -N -L 5729:localhost:5729 [EMAIL PROTECTED]
:
debug1: Connection established.
debug1: identity file /home/root/.ssh/id_rsa type 1
debug1: identity file /home/root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server-client aes128-cbc hmac-md5 none
debug1: kex: client-server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(102410248192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'athlux.homelinux.org' is known and matches the RSA host key.
debug1: Found key in /home/root/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
:

What should I do?

Thanks in advance
Matthias
-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: start ssh port forwarding at boot time

2008-06-15 Thread Matthias Meyer
Am Sonntag 15 Juni 2008 schrieb René Berber:
 Matthias Meyer wrote:
 
  I try to start port forwarding shortly after boot by using cygrunsrv.
  
  $ cygrunsrv -Q forward5729
  Service : forward5729
  Current State   : Stopped
  Command : /usr/bin/ssh -v -f -2 -N -L 5729:localhost:5729 
  [EMAIL PROTECTED]
 [snip]
  What should I do?
 
 Run the service as your user so it can use your keys :
 
-u, --user user nameOptional user name to start service as.
  Defaults to SYSTEM account.
-w, --passwd password   Optional password for user. Only needed
  if a user is given. If a user has an empty
  password, enter `-w '. If a user is given but
  no password, cygrunsrv will ask for a password
  interactively.
 
 -- 
 René Berber
[EMAIL PROTECTED] ~
$ cygrunsrv -I forward -p /usr/bin/ssh -a -v -f -2 -N -L 5729:localhost:5729 
[EMAIL PROTECTED] -u root -w password
$ cygrunsrv -S forward
cygrunsrv: Error starting a service: StartService:  Win32 error 1069:
Der Dienst konnte wegen einer fehlerhaften Anmeldung nicht gestartet werden.

which means in english:
The service could not be started because of an incorrect registration.
But I'm sure. Username and password are correct.

Nothing will be written in /var/log/forward.log.

Thanks
Matthias
-- 
Don't Panic

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/