I am facing an issue with my server that php session is not able to store data. Now, I changed my session directory permission to 777. Can any one confirm that this permission is correct and secure?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
As user prehfeldt said, "correct and secure" depends on the context. The important thing is that as I understand from your question, you have customized the directory where php sessions are saved. This is a good practice, especially if you are on shared hosting. Since the sessions directory is not placed in your public folders (making it accessible to anyone), the permissions you set should not be a problem.
Anyway, minimum permissions needed are read/write permissions for the user that represents the server (usually for apache apache runs with owner & group www-data, but this might not be the case with all linux servers distributions).