Topic "550 Can't remove directory: No such file or directory"

Author Message
mattyc
[View user's profile]

Joined: 2009-07-24
Posts: 7
Location: Brighton, UK
Using WinSCP 4.1.9 connecting via ftp

It appears to only be a problem with fasthosts servers - I have a dedicated server running CentOS 5.3

I can't delete folders (full or empty). I know it's a problem with WinSCP as I can delete the same folders fine using Dreamweavers ftp unctionality.

ftp log:
Creating directory "test".
CWD /user/htdocs/
250 OK. Current directory is /user/htdocs
MKD test
257 "test" : The directory was successfully created
Retrieving directory listing...
TYPE A
200 TYPE is now ASCII
PORT 192,168,100,60,8,61
200 PORT command successful
LIST -a
150 Connecting to port 5017
226-Options: -a -l
226 7 matches total
Directory listing successful
Deleting file "test".
Retrieving directory listing...
CWD /user/htdocs/test/
250 OK. Current directory is /user/htdocs/test
PWD
257 "/user/htdocs/test" is your current location
TYPE A
200 TYPE is now ASCII
PORT 192,168,100,60,8,63
200 PORT command successful
LIST -a
150 Connecting to port 5018
226-Options: -a -l
226 2 matches total
Directory listing successful
Synchronizing current directory "/user/htdocs".
CWD /user/htdocs
250 OK. Current directory is /user/htdocs
RMD /user/htdocs/test/
550 Can't remove directory: No such file or directory
Asking user:
Error deleting file 'test'. ("Can't remove directory: No such file or directory")

If i now connect with dreamweaver using same login details I can delete the folder fine!

Please help.

I can delete files fine:

Deleting file "test.html".
DELE /user/htdocs/test.html
250 Deleted /user/htdocs/test.html
Retrieving directory listing...
CWD /user/htdocs/
250 OK. Current directory is /user/htdocs
PWD
257 "/user/htdocs" is your current location
TYPE A
200 TYPE is now ASCII
PORT 192,168,100,60,8,138
200 PORT command successful
LIST -a
150 Connecting to port 5027
226-Options: -a -l
226 6 matches total
Directory listing successful
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Can you post a log file showing Dreamweaver deleting the directory? I.e. the same task shown in WinSCP log.
_________________
Martin Prikryl
mattyc
[View user's profile]

Joined: 2009-07-24
Posts: 7
Location: Brighton, UK
Hi Martin

No problem. Here is exactly the dreamweaver ftp log for exactly the same proccess on the same server, the only slight difference being that from the looks of it dreamweaver creates a directory called untitled when you right click/add new folder, then it gets renamed to testwhen I type in the name i want it to be.

< 250 OK. Current directory is /user/htdocs
> MKD untitled
< 257 "untitled" : The directory was successfully created
> CWD /user/htdocs/untitled
< 250 OK. Current directory is /user/htdocs/untitled
> PWD
< 257 "/user/htdocs/untitled" is your current location
> CWD /user/htdocs/untitled
< 250 OK. Current directory is /user/htdocs/untitled
> PASV
< 227 Entering Passive Mode (88,208,218,95,217,127).
> TYPE A
< 200 TYPE is now ASCII
> LIST
< 150 Accepted data connection
< 226-Options: -l
< 226 0 matches total
> CWD /user/htdocs
< 250 OK. Current directory is /user/htdocs
> RNFR untitled
< 350 RNFR accepted - file exists, ready for destination
> RNTO test
< 250 File successfully renamed or moved
> CWD /user/htdocs/test
< 250 OK. Current directory is /user/htdocs/test
> PWD
< 257 "/user/htdocs/test" is your current location
> CWD /user/htdocs/test
< 250 OK. Current directory is /user/htdocs/test
> PASV
< 227 Entering Passive Mode (88,208,218,95,216,217).
> TYPE A
< 200 TYPE is now ASCII
> LIST
< 150 Accepted data connection
< 226-Options: -l
< 226 0 matches total
> CWD /user/htdocs
< 250 OK. Current directory is /user/htdocs
> RMD test
< 250 The directory was successfully removed

Server details :

CentOS 5.3
Fasthosts CentOS 5 dedicated servers deliver:

* Kernel 2.6
* Apache 2.2 web server
* PureFTP FTP server
* Courier POP and IMAP mail server
* Postfix SMTP mail transit agent
* MySQL database management system
* Bind 9.3 DNS
* Perl, Python and PHP scripting
* IPTables firewall security
* NTP automatic time synchronisation
* nightly updates.
mattyc
[View user's profile]

Joined: 2009-07-24
Posts: 7
Location: Brighton, UK
Also it's interesting to note that WinSCP can rename folders fine so I guess it can't be a permissions problem:

Creating directory "test".
CWD /user/htdocs/
250 OK. Current directory is /user/htdocs
MKD test
257 "test" : The directory was successfully created
Retrieving directory listing...
TYPE A
200 TYPE is now ASCII
PASV
227 Entering Passive Mode (88,208,218,95,68,133).
LIST -a
150 Accepted data connection
226-Options: -a -l
226 11 matches total
Directory listing successful
Renaming file "test" to "test2".
RNFR /user/htdocs/test
350 RNFR accepted - file exists, ready for destination
RNTO /user/htdocs/test2
250 File successfully renamed or moved
Retrieving directory listing...
TYPE A
200 TYPE is now ASCII
PASV
227 Entering Passive Mode (88,208,218,95,163,228).
LIST -a
150 Accepted data connection
226-Options: -a -l
226 11 matches total
Directory listing successful
Deleting file "test2".
Retrieving directory listing...
CWD /user/htdocs/test2/
250 OK. Current directory is /user/htdocs/test2
PWD
257 "/user/htdocs/test2" is your current location
TYPE A
200 TYPE is now ASCII
PASV
227 Entering Passive Mode (88,208,218,95,7,140).
LIST -a
150 Accepted data connection
226-Options: -a -l
226 2 matches total
Directory listing successful
Synchronizing current directory "/user/htdocs".
CWD /user/htdocs
250 OK. Current directory is /user/htdocs
RMD /user/htdocs/test2/
550 Can't remove directory: No such file or directory
Asking user:
Error deleting file 'test2'. ("Can't remove directory: No such file or directory")
davidfernando

Guest


I think that it was fixed in 4.0.6.
mattyc
[View user's profile]

Joined: 2009-07-24
Posts: 7
Location: Brighton, UK
I am running 4.1.9 (Build 416)
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Possibly your server has problems with delete syntax WinSCP is using:
RMD /user/htdocs/test/

Problem can be either full path or slash at the end.
Can you please try to manually delete a subdirectory of current working directory using following commands to see which one works?
RMD /user/htdocs/test
RMD test
RMD test/
_________________
Martin Prikryl
mattyc
[View user's profile]

Joined: 2009-07-24
Posts: 7
Location: Brighton, UK
Hi Martin

You are right. I tried all your commands via the WinSCP command line

RMD test
RMD test/

both work, where as

RMD /user/htdocs/test

Doesn't. The server is a box standard CentOS 5.3 with PureFTP. In fact the entire operating system was rebuilt last week (but the same thing happened before this).

Is there any fix as I really like WinWCP!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Well I believe it is perfectly valid to specify full path in delete command. So it should rather be fixed on server-side.

Though this issue has been added to tracker anyway.
_________________
Martin Prikryl
mattyc
[View user's profile]

Joined: 2009-07-24
Posts: 7
Location: Brighton, UK
Hi

I just tried a few other ftp clients (including fileZilla, and even windows bult in ftp!) and all work fine. Here is the log from filezilla

Command: MKD test
Response: 257 "test" : The directory was successfully created
Status: Retrieving directory listing...
Command: PASV
Response: 227 Entering Passive Mode (88,208,218,95,188,169).
Command: MLSD
Response: 150 Accepted data connection
Response: 226-ASCII
Response: 226-Options: -l
Response: 226 35 matches total
Status: Directory listing successful
Status: Retrieving directory listing...
Command: CWD test
Response: 250 OK. Current directory is /user/htdocs/test
Command: PWD
Response: 257 "/user/htdocs/test" is your current location
Command: PASV
Response: 227 Entering Passive Mode (88,208,218,95,41,36).
Command: MLSD
Response: 150 Accepted data connection
Response: 226-ASCII
Response: 226-Options: -l
Response: 226 0 matches total
Status: Directory listing successful
Command: CWD /user/htdocs
Response: 250 OK. Current directory is /user/htdocs
Command: PWD
Response: 257 "/user/htdocs" is your current location
Command: RMD test
Response: 250 The directory was successfully removed

Hopefully something can be done to fix WinWSCP as so far the interface for all other ftp clients I have looked at are terrible, but if it can't delete directories then it's not much use to me Sad

Thanks for looking into it anyway.

Matt
mattyc
[View user's profile]

Joined: 2009-07-24
Posts: 7
Location: Brighton, UK
p.s. I noticed you have described the bug in tracker as 'Some servers fail to delete directory when full...', but it has nothing todo with the directory being full... it doesn't delete empty directories either.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
mattyc wrote:
p.s. I noticed you have described the bug in tracker as 'Some servers fail to delete directory when full...', but it has nothing todo with the directory being full... it doesn't delete empty directories either.

It says nothing about directory being full. It says that your server does not allow full path (/user/htdocs/test, as opposite to just text) after RMD command.
_________________
Martin Prikryl
Demented

Guest


i cant seem to delete this folder
from my server i keep getting this error message every time and i am running winscp v4.19

Could not retrieve directory listing
The Boxer From Shantung/: No such file or directory
vayana

Guest


I know this is now a couple years later, but i just had the same issue with winscp. I had accidentally renamed a file to .bak\ and the file explorer in winscp showed only .bak Therefor I was unable to rename/download/delete the file and it kept saying no such file.

After reading this thread I downloaded filezilla, which showed the full name, and it allowed me to rename the file.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License