Bug 1740

Summary: Misleading error message in ssh-keygen
Product: Portable OpenSSH Reporter: jchadima
Component: ssh-keygenAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: minor CC: djm, jchadima
Priority: P2    
Version: 5.4p1   
Hardware: All   
OS: Linux   
Attachments:
Description Flags
patch solving the problem
none
keygen-report-stat-errors.diff dtucker: ok+

Description jchadima 2010-03-24 22:04:20 AEDT
In the case of unaccessible $HOME the ssh-keygen writes misleading error message
Comment 1 jchadima 2010-03-24 22:05:45 AEDT
Created attachment 1818 [details]
patch solving the problem
Comment 2 Damien Miller 2010-04-09 11:09:41 AEST
Is the error message that you are talking about "Could not create directory '/home/djm/.ssh'"? That doesn't seem misleading to me.
Comment 3 jchadima 2010-04-09 16:44:11 AEST
In the case when the directory exists it's misleading. One user contact me me asking why it prints "Could not create
directory '/home/luser/.ssh'" when I have one? 

The stat() result EPERM means that user have insufficient permissions to existing file, respectively to the directory containing the file.
Comment 4 Damien Miller 2010-04-23 11:12:12 AEST
Created attachment 1842 [details]
keygen-report-stat-errors.diff

tweaked patch
Comment 5 Damien Miller 2010-04-23 11:49:42 AEST
patch applied. Will be in OpenSSH-5.6p1
Comment 6 Damien Miller 2011-01-24 12:33:35 AEDT
Move resolved bugs to CLOSED after 5.7 release