即使删除后文件也会重新出现在服务器上

发布于 2024-11-04 03:00:11 字数 195 浏览 1 评论 0原文

我正在使用 cPanel 将网站的文件(wordpress 主题文件)删除到服务器,但文件仍然重新出现。这些文件的权限设置为 000。

奇怪的是,当文件位于我的本地计算机上时,它们具有适当的权限(即 777),但在上传时它们会更改为 000。您认为该网站是否感染了病毒?我运行了防病毒扫描,但没有发现任何情况。

有什么原因可能会发生这种情况吗?

I am deleting files (wordpress theme files )of my website to the server using cPanel, but still the files are reappearing. The files have a 000 permissions set.

It is strange that files have proper permissions ( i.e. 777) when they are on my local machine, but on uploading they are getting changed to 000. Do you think the site is infected by virus ? I run an Anti-Virus scan, and found none.

Any reason why this may be happening?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

蓝天 2024-11-11 03:00:11

chmod 000 拒绝您自己、您的组和其他人的读取、写入和执行权限。

文件是如何上传到服务器的?您的 FTP 程序可能会在上传文件时搞砸文件。

如果您具有 root 访问权限,则应该能够使用 $ rm -rf filename 删除

编辑

服务器上的 Umask 设置不正确。将 Umask 设置为 777 将使权限为 000。

如果您具有 shell 访问权限,则可以通过运行以下命令检查 777 Umask 值: grep 'umask 777' /etc/skel/.bashrc

如果发现任何内容,请更改 Umask到 022。如果您没有 shell 访问权限,您的主机应该能够为您解决此问题。

不要使用 cpanel 上传程序,而是使用 FTP 程序(例如 Mac 版的 Transmit 或 Windows 版的 Core FTP Pro),并确保始终使用加密的 SFTP 而不是 FTP。

chmod 000 denies read, write, and execute permission to yourself, your group, and everyone else.

How are the files uploaded to the server? Your FTP program might me screwing up the files when they are uploaded.

If you have root access you should be able to remove using $ rm -rf filename

Edit

The Umask settings on your server are not right. Setting Umask to 777 will make permissions 000.

If you have shell access you can check for 777 Umask values by running: grep 'umask 777' /etc/skel/.bashrc

If you find anything change the Umask to 022. If you don't have shell access your host should be able to fix this for you.

Instead of using the cpanel uploader use a an FTP program like Transmit for Mac or Core FTP Pro for windows and make sure to always use SFTP which is encrypted instead of FTP.

始终不够 2024-11-11 03:00:11

如果可以的话,请使用 FTP 来管理服务器文件。它比任何基于网络的客户端都更可靠。

如果没有,请尝试通过 cPanel 将权限更改为 777,然后再删除它们。如果您无法执行此操作,请联系服务器管理员来解决问题(因为它看起来像是服务器/cpanel 配置错误)。

If you have the option, use FTP to manage your server files. It's more reliable than any web-based client.

If not, try changing permissions through cPanel to 777 before deleting them. If you are unable to do that, then contact the server administrator to resolve the issue (since it looks like a server/cpanel misconfiguraiton).

俯瞰星空 2024-11-11 03:00:11

这是由服务器重新创建文件夹引起的,因为您的子域或电子邮件地址仍附加到与这些文件夹相关的域。删除与它们相关的子域和电子邮件,这些文件夹将保持删除状态。我以前也遇到过:)
蒂姆

This is caused by the server recreating folders because you have subdomains or email addresses still attached to the domains related to those folders. Delete the subdomains and emails related to them and those folders will stay deleted.Happened to me before :)
Tim

无戏配角 2024-11-11 03:00:11

备份文件夹中的其他文件,然后删除文件夹。
使用以前的文件夹名称(您删除的文件夹)创建新文件夹并将备份的文件复制到其中。

backup other files in folder then delete folder.
create new folder with previous folder name (that was you deleted) and copy backuped files to it.

琉璃繁缕 2024-11-11 03:00:11

这可能只适用于不知道如何操作的其他用户,或者没有 shell 访问权限的用户:

  1. 检查您要删除的内容是文件夹还是文件
  2. 如果是文件夹,请检查对该文件夹的权限并更改为 755,如果它是文件,则执行相同的操作并简单地删除
  3. 这里的问题是您必须打开该文件夹并将其中的所有子文件夹和文件更改为权限设置755.
  4. 删除子文件夹内部的文件,然后删除到文件夹

这也许会对某人有所帮助。

This may just work for other users who don't know how to do the techies, or who don't have shell access:

  1. Check to see whether what you want to delete is a FOLDER or a FILE
  2. If it is a FOLDER, check the permissions on that FOLDER and change to 755, do the same if it a FILE and simply delete
  3. The issue here is that you have to open the FOLDER and CHANGE ALL SUBFOLDERS and FILES inside it to permission settings 755.
  4. Delete the files from the inside of the SUBFOLDERS out then to the FOLDERS

This should perhaps help someone.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文