dongyao9762 2008-09-14 00:09
浏览 38
已采纳

如何确定PHP脚本的权限设置?

What are the best file permission settings for PHP scripts? Any suggestions on ways to figure out the minimum required permissions?

  • 写回答

2条回答 默认 最新

  • dtz55359 2008-09-14 01:30
    关注

    WalloWizard is correct that you should only use the minimum permissions necessary for the script to function.

    However, let me be more specific, assuming that you're running on a Unix-based system such as Linux or BSD or Mac OSX. Your web server usually runs as an unprivileged user such as "nobody" and your scripts need to be readable by that user, so the best permissions are usually 644, meaning that you can read and write the script, and everyone else can only read it.

    In the uncommon case that the script is owned by the same user running the web server, you can set the permissions to 600, so that you can read and write the script and no one else can even read it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100