Answer the question
In order to leave comments, you need to log in
How to set permissions for deletion when uploading a file to the server?
Faced such a problem that I can not delete the file after it has been uploaded to the server.
For the folder , I /var/www
set the user sudo chown serii:www-data
and so far everything seemed to work, now when uploading the files, the user www-data:www-data
and the rights are 644. How to be in this case?
After all, they will not constantly change the rights through the terminal?
Although I don’t understand, I was able to delete it through the terminal without a superuser, but phpstorm does not allow it.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
You can delete a file if you have write permissions on the directory, and it doesn't matter what permissions are on the file itself.
So either you must be serii and the directory must have write for the owner, or you must be in the www-data group and the directory must have write for the group.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question