无法删除目录
我的网络托管(共享)经常出现问题,
我无法删除或更改特定目录的权限。 回复是,
Cannot delete. Directory may not be empty
我检查了权限,看起来没问题。 该文件夹中有 100 个我不想要的文件。
我联系了我的支持人员,他们解决了这个问题,说这是权限问题。 但它又出现了。 有什么建议么?
服务器是Linux。
I am having a frequent problems with my web hosting (its shared)
I am not able to delete or change permission for a particular directory. The response is,
Cannot delete. Directory may not be empty
I checked the permissions and it looks OK. There are 100's of files in this folder which I don't want.
I contacted my support and they solved it saying it was permission issue. But it reappeared. Any suggestions?
The server is Linux.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为这是来自 FTP 服务器的响应?
通常,来自 FTP 服务器的消息确实意味着这一点。 如果它说该目录不为空,则该目录中可能存在某些您看不到的文件,这些文件可能是以下之一:
如果它来自脚本,请编写一个一次性脚本来删除文件和该目录,然后上传并执行它。
需要确定的是,有些 FTP 服务器不支持直接删除目录,您需要先删除所有文件,是这样吗?
I assume that's a response from an FTP server?
Usually, a message from an FTP server really means it. If it says the directory is not empty, there might be certain files you cannot see that exists in the directory which maybe one of:
If it comes from a script, write a one-time throw-away script that delete the files and that directory and then uploads and executes it.
And just to be sure, some FTP server doesn't support direct directory deletion, you need all the files first, is that the case?
这也可能是因为您的 FTP 客户端可能不会显示隐藏文件(例如缓存或您的应用程序可能创建的任何隐藏文件),而隐藏文件会阻止您删除目录。 (不过,在你的情况下,我不确定这是否是原因......这可能是你的托管提供商的权限问题......作为另一个用户(如apache或www)运行的网络服务器与具有全局写入权限的目录相结合) 。
This could also be because your FTP client might not be showing the hidden files (like cache, or any hiddn files that your application might create), while the hidden files are preventing you from deleting the directory. (though, in your case, I am not sure if this is the cause .. .it could be permission issue with your hosting provider.. Webserver running as another user (like apache or www) combined with your directories having global write perms).
您不能 rmdir 包含文件的目录。 您必须首先rm所有文件和子目录。 很多时候,最简单的解决方案是:
某些文件或子目录完全有可能具有权限限制,可能会阻止它们被删除。 有时,这可以通过以下方式解决:
但我怀疑这就是您的支持人员之前所做的。
You can't rmdir a directory with files in it. You must first rm all files and subdirectories. Many times, the easiest solution is:
It's entirely possible that some of the files or subdirectories have permission limitations that might prevent them from being removed. Occasionally, this can be solved with:
But I suspect that's what your support people did earlier.