Case Study: FTP 550 "The system cannot find the file specified" Error on Win2003
One customer reported that “An error occurred opening the folder on Win2003 FTP server. Make sure you have the permission to access this folder. Details:550:/XXXXXX/XXXXX: The system cannot find the file specified.”
We checked its configuration file. The requested FTP address is ftp://** /CustomerVirtualfolder/ The FTP server is configured as below:
<IIsFtpVirtualDir Location=" /LM/MSFTPSVC/1/ROOT/CustomerVirtualFolder" Path="F:\FTPUsers\ CustomerVirtualFolder " AccessFlags="AccessRead | AccessWrite"> </IIsFtpVirtualDir>
From the network monitor log and find the trace as below.
3414 15:49:46 2013/12/30 Monday 37.1449974 Explorer.EXE sourceip destinationip FTP FTP:Request from Port 13257,'USER CustomerVirtualFolder{TCP:1270, IPv4:369}
3428 15:49:46 2013/12/30 Monday 37.4356140 Explorer.EXE destinationip sourceip FTP FTP:Response to Port 13257, '331 Password required for CustomerVirtualFolder.' {TCP:1270, IPv4:369}
3429 15:49:46 2013/12/30 Monday 37.4357034 Explorer.EXE sourceip destinationip TCP TCP:Flags=...A...., SrcPort=13257, DstPort=FTP control(21), PayloadLen=0, Seq=1100298549, Ack=2976341223, Win=1023 (scale factor 0x8) = 261888 {TCP:1270, IPv4:369}
3430 15:49:46 2013/12/30 Monday 37.4357378 Explorer.EXE sourceip destinationip FTP FTP:Request from Port 13257,'PASS ' {TCP:1270, IPv4:369}
3468 15:49:46 2013/12/30 Monday 37.7265963 Explorer.EXE destinationip sourceip FTP FTP:Response to Port 13257, '230 User CustomerVirtualFolder logged in.' {TCP:1270, IPv4:369}
3469 15:49:46 2013/12/30 Monday 37.7266823 Explorer.EXE sourceip destinationip TCP TCP:Flags=...A...., SrcPort=13257, DstPort=FTP control(21), PayloadLen=0, Seq=1100298568, Ack=2976341254, Win=1023 (scale factor 0x8) = 261888 {TCP:1270, IPv4:369}
3470 15:49:46 2013/12/30 Monday 37.7268302 Explorer.EXE sourceip destinationip FTP FTP:Request from Port 13257,'opts utf8 on' {TCP:1270, IPv4:369}
3503 15:49:47 2013/12/30 Monday 38.0179558 Explorer.EXE destinationip sourceip FTP FTP:Response to Port 13257, '501 option not supported' {TCP:1270, IPv4:369}
3504 15:49:47 2013/12/30 Monday 38.0180527 Explorer.EXE sourceip destinationip TCP TCP:Flags=...A...., SrcPort=13257, DstPort=FTP control(21), PayloadLen=0, Seq=1100298582, Ack=2976341280, Win=1023 (scale factor 0x8) = 261888 {TCP:1270, IPv4:369}
3509 15:49:47 2013/12/30 Monday 38.0222166 Explorer.EXE sourceip destinationip FTP FTP:Request from Port 13257,'PWD' {TCP:1270, IPv4:369}
3520 15:49:47 2013/12/30 Monday 38.3127285 Explorer.EXE destinationip sourceip FTP FTP:Response to Port 13257, '257 "/ CustomerVirtualFolder " is current directory.' {TCP:1270, IPv4:369}
3521 15:49:47 2013/12/30 Monday 38.3127946 Explorer.EXE sourceip destinationip TCP TCP:Flags=...A...., SrcPort=13257, DstPort=FTP control(21), PayloadLen=0, Seq=1100298587, Ack=2976341320, Win=1023 (scale factor 0x8) = 261888 {TCP:1270, IPv4:369}
3522 15:49:47 2013/12/30 Monday 38.3129365 Explorer.EXE sourceip destinationip FTP FTP:Request from Port 13257,'CWD / CustomerUsername / CustomerVirtualFolder/' {TCP:1270, IPv4:369}
3542 15:49:47 2013/12/30 Monday 38.6037147 Explorer.EXE destinationip sourceip FTP FTP:Response to Port 13257, '550 / CustomerUsername / CustomerVirtualFolder: The system cannot find the file specified. ' {TCP:1270, IPv4:369}
We can find that the username is windplant, "/ CustomerVirtualFolder " is current directory . The actual path is / CustomerUsername/ CustomerVirtualFolder. But this folder does not exist, so this 550 error will occur.
In order to valid this is by design. we build an FTP site on Win2003 machine.
Create a user called windplant which is the same as Virutual Directory Folder name.
Try to visit the ftp site, the same 550 error occur.
Check the FTP log trace and find that the current directory is /windplant.
675 10:24:01 AM 12/31/2013 25.5640418 sourceip 172.23.128.88 FTP FTP:Request from Port 1864,'USER windplant' {TCP:314, ESP:2, IPv4:1}
685 10:24:01 AM 12/31/2013 25.5640418 172.23.128.88 sourceip FTP FTP:Response to Port 1864, '257 "/windplant" is current directory.' {TCP:314, ESP:2, IPv4:1}
If use administrator or other username to log in, the default directory is “/” , the site can be visited successfully.
1074 10:38:41 2013/12/31 14.0991812 System sourceip 172.23.128.88 FTP FTP:Request from Port 2016,'USER test ' {TCP:511, ESP:311, IPv4:310}
1088 10:38:41 2013/12/31 14.1097693 System 172.23.128.88 sourceip FTP FTP:Response to Port 2016, '257 "/" is current directory.' {TCP:511, ESP:311, IPv4:310}
This is a by design behavior. When you try to visit your virtual directory on your FTP server. If the username is the same with your ftp virtual directory name. The current directory will be “/username”. Then the actual path will be “/username/virtual directory name”. Then the 550 error will occur.
To workaround this, create a new windows user which name is not the same with the ftp virtual folder.
Charles from APGC DSI Team
Comments
- Anonymous
January 26, 2014
You have no idea how much this case study helped me!Thanks a million! - Anonymous
July 30, 2014
Bro, you are the best... Cheers - Anonymous
June 15, 2015
Had I not been came across this blog, I'd had spent a whole day figuring out the actual issue (and that too, without any success!)... thanks a ton man!!