[Bug 1300] rename doesn't work on Linux vfat

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Sun Mar 18 11:08:07 EST 2007


http://bugzilla.mindrot.org/show_bug.cgi?id=1300

           Summary: rename doesn't work on Linux vfat
           Product: Portable OpenSSH
           Version: 3.8p1
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: sftp-server
        AssignedTo: bitbucket at mindrot.org
        ReportedBy: tilman.vogel at web.de


Looking for a solution to the above problem, I saw in CVSWeb that in
current versions of OpenSSH, there is code in process_rename() in
sftp-server.c which checks if links are available on the target
filesystem. 

It does so by checking the errno given by link() against EOPNOTSUPP. 
The problem is: At least on Linux 2.6.x with glibc 2.3.5, link()
returns EPERM in this case as is also documented in my copy of "man 2
link":
...
      EPERM  oldpath is a directory.

       EPERM  The filesystem containing oldpath and newpath does not
support the creation of hard links.
...

Thus the lack of link support is not detected and rename will not fall
back to the stat/rename code. process_rename() fails even though it
doesn't have to.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the openssh-bugs mailing list