S
S
Sergey Burduzha2017-09-20 16:39:19
ubuntu
Sergey Burduzha, 2017-09-20 16:39:19

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/wwwset the user sudo chown serii:www-dataand so far everything seemed to work, now when uploading the files, the user www-data:www-dataand 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

1 answer(s)
S
Saboteur, 2017-09-20
@serii81

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 question

Ask a Question

731 491 924 answers to any question