search

Home  >  Q&A  >  body text

centos - LINUX服务器网站目录的权限该如何设置?

CENTOS 7.2

比如网站的文件夹名称是www。 它的所有者(chown)应该如何设置? 那个通过 chmod -R XXX 用数字设置权限的命令,一般数字设置多少?

网站目录需要可执行的权限吗,运行PHP的话不需要可执行权限吧?

怪我咯怪我咯2775 days ago836

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-04-26 09:04:17

    Generally speaking, the file permissions are 755, which means that all permissions are open to you, and other users have read and execute rights but no write rights.
    If you ask whether the directory needs execution permissions, of course, it does. If the directory does not have execution permissions, you cannot enter the directory at all (you can open the directory as an execution directory).
    If the PHP file you are referring to does not require execution permissions, or the one above, 755 is enough.

    reply
    0
  • Cancelreply