Opened 20 years ago
Last modified 18 years ago
#831 closed Bug report
problems if no read premission on root dir
Reported by: | neonelf | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Other |
Keywords: | Cc: | neonelf, Tim Kosse | |
Component version: | Operating system type: | ||
Operating system version: |
Description
if a user logs in with no read permission on the root
directory (ie a secure ftp drop site that denies it),
the program fails to continue to process commands. I
would assume it chokes without being able to fill in
the remote listview. a sample log goes like this:
Response: 200 PORT command successful.
Command: TYPE A
Response: 200 Type set to A.
Command: LIST
Response: 150 Opening ASCII mode data connection for
/bin/ls.
Response: 550 .: Access is denied.
Error: Could not retrieve directory listing
After this error it will not allow a file to be
transfered.
I tried this on our local server which was causing the
problem, and then on another server which has other
non-readable directories. There does not seem to be a
problem if a lower level directory denies read access,
or it maybe limited to a windows FTP server as those
were the only two variables that differed between a
working server and a failing server.
ok here's an extended log:
Status: Connected
Trace: FtpControlSocket.cpp(3689): ResetOperation(1)
OpMode=1 OpState=-14 caller=0x00d4cfac
Trace: FtpControlSocket.cpp(1057): List(FALSE,0,"","",1)
OpMode=0 OpState=-1 caller=0x00d4cfac
Status: Retrieving directory listing...
Command: PWD
Trace: FtpControlSocket.cpp(695): OnReceive(0) OpMode=4
OpState=0 caller=0x00d4cfac
Response: 257 "/" is current directory.
Trace: FtpControlSocket.cpp(1057): List(FALSE,0,"","",0)
OpMode=4 OpState=0 caller=0x00d4cfac
Command: PORT 192,168,0,91,11,174
Trace: FtpControlSocket.cpp(695): OnReceive(0) OpMode=4
OpState=7 caller=0x00d4cfac
Response: 200 PORT command successful.
Trace: FtpControlSocket.cpp(1057): List(FALSE,0,"","",0)
OpMode=4 OpState=7 caller=0x00d4cfac
Command: TYPE A
Trace: FtpControlSocket.cpp(695): OnReceive(0) OpMode=4
OpState=8 caller=0x00d4cfac
Response: 200 Type set to A.
Trace: FtpControlSocket.cpp(1057): List(FALSE,0,"","",0)
OpMode=4 OpState=8 caller=0x00d4cfac
Trace: TransferSocket.cpp(559): SetActive() caller=0x0153625c
Command: LIST
Trace: FtpControlSocket.cpp(695): OnReceive(0) OpMode=4
OpState=9 caller=0x00d4cfac
Response: 150 Opening ASCII mode data connection for /bin/ls.
Trace: TransferSocket.cpp(388): OnAccept(0) caller=0x0153625c
Trace: FtpControlSocket.cpp(1057): List(FALSE,0,"","",0)
OpMode=4 OpState=9 caller=0x00d4cfac
Trace: TransferSocket.cpp(519): OnClose(0) caller=0x0153625c
Trace: TransferSocket.cpp(1140): Close() caller=0x0153625c
Trace: TransferSocket.cpp(1140): Close() caller=0x0153625c
Trace: FtpControlSocket.cpp(1715): TransferEnd(4) OpMode=4
OpState=10 caller=0x00d4cfac
Trace: FtpControlSocket.cpp(1057): List(TRUE,0,"","",0)
OpMode=4 OpState=10 caller=0x00d4cfac
Trace: <Empty directory listing>
Trace: TransferSocket.cpp(91): ~CTransferSocket()
caller=0x0153625c
Trace: TransferSocket.cpp(1140): Close() caller=0x0153625c
Trace: FtpControlSocket.cpp(695): OnReceive(0) OpMode=4
OpState=10 caller=0x00d4cfac
Response: 550 .: Access is denied.
Trace: FtpControlSocket.cpp(1057): List(FALSE,0,"","",0)
OpMode=4 OpState=10 caller=0x00d4cfac
Trace: FtpControlSocket.cpp(3689): ResetOperation(4)
OpMode=4 OpState=10 caller=0x00d4cfac
Error: Could not retrieve directory listing
I traced it to this section of the code:
if (m_Operation.nOpState==LIST_WAITFINISH)
That starts at line 1152 in FtpControlSocket.cpp It seems
for some reason you're setting the nFinish to 0 (or it's
already set to 0?) and it calls a reset operation with
FZ_REPLY_ERROR. That kills the connection.