A
A
Alexander Leyba2019-07-15 17:59:03
linux
Alexander Leyba, 2019-07-15 17:59:03

How to correctly set permissions for a folder and all its subdirectories?

Good day, such a problem, I have a directory in which users upload files, I set the rights to it sudo chmod 755 images / then in the folder itself I registered sudo chmod 644 * , I check everything works correctly, but after some time when the user uploads a picture, the server issues 403 and you have to repeat the whole procedure again. How to correctly set the rights so that when adding new files there would be no errors?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sanes, 2019-07-15
@Alex_shady

  1. set the permissions for the entire site directory recursively using find
    And everything will pass.

R
Radjah, 2019-07-15
@Radjah

man chown
The files have UID and GID, there is not a word about them in the question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question