Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Because often the script does not have sufficient rights to delete files from its directory.
Not without reason, many CMS recommend setting permissions 0777 (rwxrwxrwx) to the upload directory to upload files via the web interface.
For example, if php is executed under Apache from the user apache:apache, and CMS was uploaded via FTP by Vasya Pupkin under the user vasya:wheel.
It is also possible that scripts loaded by the user vasya are executed on his behalf.
In this case, the script can delete files and directories without additional gestures.
While the file is being executed, it is not read/write.
In addition, the installation may not go as planned. Returning the installation file (and in some cases the entire directory) is redundant.
PS Don't use CMS :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question