Deleting a symbolic link via FTP

October 14th, 2008    1 Comment

I just struggled for a while to delete a symbolic link on my Web server that was causing me problems. The main problem was that I couldn't download it, which meant that I couldn't download the whole of my WordPress installation as a backup. I had to copy directories down piecemeal to specifically avoid copying that file (advanced-cache.php).

I'm not sure what the problem was because the file the symlink was pointing to (wp-content/plugins/wp-cache/wp-cache-phase1.php) was still there. I had to use ClassicFTP to find this out because FileZilla doesn't show you were a symlink is pointing to. In fact, FileZilla treats symlinks as if they are directories and doesn't show the destination. ClassicFTP does, but doesn't show the ownership or permissions on files, which makes it inferior to FileZilla.

The other problem was that I couldn't simply delete it in FileZilla or ClassicFTP.

The solution I finally found was just to FTP to my Web server from the good old Windows command line. Fire up a command console window, type: ftp <host> then, when prompted, your user name and password. Use ls and cd to navigate to the directory containing the symlink.

Strangely, the symlink doesn't show up when you do an ls. However, if you do delete <symlink name> it will delete the symbolic link successfully.

Job done!

Potentially similar posts

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Comments

  1. User Gravatar Mike said:

    June 28th, 2009 at 11:16 am (#)

    <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->

    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";}

    Many thanks for this post. I struggled for a day too to delete the same file but then this post did the marvelous job in 2 minutes. Thanks again.

Leave a comment