Cannot delete, a file with that name may already exist

允我心安 提交于 2019-12-11 06:18:58

问题


This is starting to vex me. I recently decided to clear out my FTP, and stumbled across an old Wordpress install I forgot I had (oh yes, very security conscious me). Anyway, for some reason deleting the directory failed so I investigated to see what was causing the blockage and I've narrowed it down to a file in wp-content.

Now when I try to delete this file I can get two errors. I've tried in Windowx Explorer (FTP) and the Web Control Panel's File Manager. Here's some error shots:

As you can see my File manager thinks the file is a Symbolic Link. While it scares me that my web server is host to an obviously religoious artifact I'm also heavily confused by the situation.

  • I've tried renaming the file.
  • I've refreshed the FTP view.
  • I've tried moving the file to another dir (which worked, no success on deletion though).
  • I've tried editing the file and then deletion.

And I'm at a loss. Is there a special way to delete SymLinks? I've never heard of them, until now.

edit

Oho Windows you really are a magician of sorts. I decided to take a look at my FTP via command prompt and guess what? The file doesn't exist. Whether ftp ignores symlinks I don't know but I'm about to give up :P


回答1:


First of all, try emailing your webhost either for SSH-access or to remove the symlink for you.

If you get SSH-access, use:

unlink index.php

Or if neither works: Create a PHP file there (for instance remove.php) that contains:

<?php unlink("./index.php") ?>

Then open that file in your browser, afterwards remove the remove.php file.



来源:https://stackoverflow.com/questions/27655/cannot-delete-a-file-with-that-name-may-already-exist

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!