Home  >  Article  >  Backend Development  >  What to do if php chmod() fails

What to do if php chmod() fails

藏色散人
藏色散人Original
2020-08-17 09:52:394339browse

php chmod fails because PHP has insufficient permissions when calling the chmod function. The solution is to manually modify the permissions of the modified files or directory permissions, and modify the user group to which the file or directory belongs. Modify statements such as "chmod - R 777 ./dirname".

What to do if php chmod() fails

Recommended: "PHP Video Tutorial"

PHP Error: chmod() [function.chmod]: Permission Denied in solution

php error PHP Warning: chmod() [function.chmod]: Permission denied in...

Cause analysis:

php has insufficient permissions when calling the chmod function

Solution:

Manually modify the permissions of the modified file or directory permissions, and modify the user group of the file or directory

chmod -R 777 ./dirname
chown -R www:www ./dirname

The above is the detailed content of What to do if php chmod() fails. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn