它是安全的拒绝访问.ini文件在.htaccess? [英] Is it safe to deny access to .ini file in .htaccess?

查看:123
本文介绍了它是安全的拒绝访问.ini文件在.htaccess?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.ini文件,在我的PHP应用程序水务局的敏感信息。我使用.htaccess文件拒绝访问到它:

I have a .ini file with sensitive information in my php wab app. I denied access to it using a .htaccess file:

<files my.ini>
  order deny,allow
  deny from all
</files>

我没有获得htdocs目录以外的文件夹,这样我就可以不动.ini文件出了可浏览的领土。

I don't have access to folders outside of htdocs, so I can't move the .ini file out of browsable territory.

是我的解决方案安全吗?

Is my solution safe?

推荐答案

本的.htaccess将阻止Web访问。不过,如果你使用一个共享的主机环境中,有可能对其他用户访问您的INI。如果它是一个(虚拟专用)服务器上,你该服务器你是安全的唯一用户。

The .htaccess will block access from the web. However, if you're using a shared hosting environment, it might be possible for other users to access your ini. If its on a (virtual private) server and you're the only user for that server you're safe.

在的情况下共同主办这取决于服务器配置。 欲了解更多信息阅读:<一href="http://www.hostreview.com/guides/Technical_Support/articles/PHPSecurityinSharedEnvironment.html">PHP在共享宿主环境安全性

In case of shared hosting it depends on server configuration. For more info read: PHP Security in a shared hosting environment

您可以暂时安装 PHPShell 并浏览服务器的文件系统检查,如果你的服务器是脆弱的。 (需要一些命令行的知识)

You can temporarily install PHPShell and browse through the server filesystem to check if your server is vulnerable. (requires some commandline knowledge)

这篇关于它是安全的拒绝访问.ini文件在.htaccess?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆