mod: first check then chown - #402
Conversation
Checking is way faster than setting. First check, if it fails set the ownership new.
mod: first check then chown
|
Your proposal is not optimal, since a recursive This will only modify files with incorrect permissions and avoid a recursive chown. |
|
Yes, that's a way better thing for a few wrong files. At the first instance I do not understand why this is needed at all. I do not know which case that could be... Basically I just want to avoid the permanent chown on our half TB of files via slow NFSv3... This takes about 15 minutes. |
If all files need to be fixed, so they have to be fixed no matter how much time it takes.. otherwise the app will not work. But that's in the worst-case scenario. In fact, permissions on files should never change. This I understand this could be a performance issue. Did you tried to launch the command I gave you in the previous message on your instance to see what time it takes to execute? |
|
Not yet. But next week I can test your command on our production. |
00ffb48 to
e086253
Compare
As we restart our repomanager a lot, we noticed there is a chown running minutes.
Whilst this everything is very slow.
Checking is way faster than setting.
So first check, if it fails set the ownership new.