Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设网站存储在c:\websites\testing.com\
c:\websites\testing.com\
目前,Web 应用程序将文件写入:
/uploads/ /robots.txt /sitemap.xml
而不是必须授予每个文件的权限,只是c:\websites\testing.com\为应用程序池用户(例如IIS AppPool\testing)授予对整个文件夹的读/写访问权限是否具有安全含义?
IIS AppPool\testing
可能发生的“最坏情况”是什么?
这取决于您的应用程序的安全性。我会特别注意任何路径遍历漏洞。例如,如果用户可以上传将文件名传递为 " 的文件../foo.aspx"?您必须使用拦截代理对其进行测试。如果是这样,他们可能会将文件写入您的根文件夹。
../foo.aspx"
这是路径遍历的一个示例,它不一定必须以双点开头。如果您确信您的应用程序是安全的,则风险很小,但由于您的情况只有 3 个文件和文件夹,最好单独应用权限。