PHP的上传文件的安全权限 [英] php safe permissions for uploaded file
本文介绍了PHP的上传文件的安全权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问:上载文件夹和文件上传到该文件夹的安全权限是什么?
需要的操作:
folder = remove / create
file = create / remove / rename / rewrite
我应该设置什么chmod?
What chmod should I set?
它们将与 safe_mode = on 一起使用吗? ?
will they work with safe_mode = on ?
推荐答案
,您可以使用 umask ,因此权限是在文件上传期间设置的,您以后不必更改它们。
you can use umask so the permissions are set during file upload and you don't have to change them later.
返回对你的问题。默认的umask通常为022(目录为755,文件为644)。为了允许访问Web服务器,其他位很重要。
Back to your question. The default umask is usually 022 (755 for directories, 644 for files). The Other bit is important in order to allow access to a web server.
这篇关于PHP的上传文件的安全权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文