Home >Backend Development >PHP Problem >What should I do if php cannot create a directory under Linux?

What should I do if php cannot create a directory under Linux?

藏色散人
藏色散人Original
2020-08-19 09:41:552585browse

Solution to the problem that php cannot create a directory: First, use the command "ps -e -f | grep php" to find the user group to which php belongs; then use the chown command to change the owner of the specified file to the specified user or group That’s it.

What should I do if php cannot create a directory under Linux?

Recommended: "PHP Video Tutorial"

php cannot create folders and files under Linux Question

The same code for creating a folder works under Windows, but not under Linux.

Then I checked the information. It was found that it was a permissions issue

You can know the user/group to which php belongs by running ps -e -f | grep php.

I am apache here

Then if you want to create or delete a directory or subdirectory under a certain folder,

Use chown to change the owner of the specified file For the specified user or group

The above is the detailed content of What should I do if php cannot create a directory under Linux?. 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