Answer the question
In order to leave comments, you need to log in
How to correctly assign the owner and group of a folder so that the script can upload files?
Good day.
I'm having a problem uploading files using Wordpress.
Wordpress root directory is /home/domain.com/www, it tries to upload files to
/home/domain.com/www/wp-content/uploads.
The owner of the folders and files is the ublog user
Files: 0644
Folders: 0755
The Wordpress script runs under the www-data user.
What needs to be done so that Wordpress scripts can upload files to a folder?
If I give chmod 0777, will any scripts on the server be able to upload files to the uploads folder, even those that do not belong to me?
If I make the owner of the uploads folder of the www-data user, then it turns out that, again, any script running on the server will be able to upload files to the folder?
I would be very grateful if you tell me a safe way out of the situation.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question