Ticket #258 (closed defect: fixed)

Opened 11 months ago

Last modified 6 months ago

MKD before CWD causes 540 error

Reported by: exoa Owned by: djb61
Priority: normal Milestone: 3.0
Component: VirtualFileSystem Version: 3.0alpha
Severity: normal Keywords: mkd cwd 540
Cc:

Description

When using FTPRush with a dated directory (/mp3-today), MKD fails before issuing CWD which subsequently fails and causes the transfer to fail. This affects all dated directories when transferring to the -today directory with any client that uses the same order of commands as FTPRush. The current workaround is using bookmarks in FTPRush with the /mp3/%mm%%dd%/ path but that only works if the timezones between fxping servers are synced because FTPRush seemingly only uses timezone information from the fxp site with the files. If Site1 is GMT+1 and Site2 is GMT then at 00:00-00:59 GMT+1 the Site1 files will try to transfer to a dated directory that has yet to be created on Site2.

Example:
[xx] MKD /MP3-TODAY/This_Mp3-Release
[xx] 540 Command execution failed
[xx] CWD /MP3-TODAY/This_Mp3-Release
[xx] 550 Inode does not exist
[xx] STAT -al

This is confirmed to work on v2 and not on v3.

Change History

Changed 10 months ago by erich

  • owner changed from zubov to djb61
  • severity changed from major to normal

Changed 10 months ago by djb61

Please include the stacktrace from drftpd.log for the 540 response from MKD.

Changed 10 months ago by djb61

Here is the stacktrace, the problem is we aren't resolving out the symlink and then we try and treat it as a directory and throw a cast exception.

ERROR 18 Sep 2009 22:24:37 [FtpConn thread 60 from 192.168.3.100 - pool-27-thread-1] org.drftpd.commandmanager.StandardCommandManager  - Command mkd failed
java.lang.ClassCastException: DirectoryHandle object pointing to Inode:Link[path=/MP3-today][user,group=drftpd,drftpd][lastModified=1251738268175][size=9][link=/mp3/0918]
	at org.drftpd.vfs.DirectoryHandle.getInode(DirectoryHandle.java:97)
	at org.drftpd.vfs.DirectoryHandle.createDirectoryUnchecked(DirectoryHandle.java:598)
	at org.drftpd.vfs.DirectoryHandle.createDirectory(DirectoryHandle.java:632)
	at org.drftpd.commands.dir.Dir.doMKD(Dir.java:257)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.drftpd.commandmanager.StandardCommandManager.execute(StandardCommandManager.java:203)
	at org.drftpd.master.BaseFtpConnection$CommandThread.run(BaseFtpConnection.java:556)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)

Changed 6 months ago by djb61

  • status changed from new to closed
  • resolution set to fixed

Fixed as of [2021]

Note: See TracTickets for help on using tickets.