.well-known Directory gets deleted automatically #258

Closed
opened 2026-04-05 20:26:13 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @vreoo on 3/12/2024

CloudPanel version(s) affected

2.4.0

Description

On our single WordPress Website, we created .well-known Directory inside our htdocs/<site_name>/.well-known and the only files we need inside it is the assetlinks.json for Android's Deeplinks, and apple-app-site-association for iOS Deeplinks.

After some time we begin to notice that the deeplinks don't work anymore, and when we check we discover that the whole .well-known directory is deleted from the server under the same path I provided previously (htdocs/<site_name>/.well-known).

We are not sure what is the reason behind this, but after a little research, we knew that a corn job related to the certificate renewal is causing this to happen whenever it runs. We don't have much experience in this regard so we didn't mess around with any configurations or files since we might cause more issues than solving the one we have already.

While we were investigating we noticed a configuration line in our Vhost (knowing we didn't mess up or change anything inside it) regarding the .well-known directory which says:

location ~ /.well-known {
   auth_basic off;
   allow all;
}

It's worth mentioning that there is a .well-known directory under the default path ~/ that doesn't get deleted or removed but it's not visible to Google Play or iOS when they try to verify the files associated with this directory. Since they require for the verification that these files are accessible (readable) via: https://<site_name>/.well-known/assetlinks.json and the same for the iOS conf file I mentioned at the beginning. So the directory under the default path is not much of a use for us so we don't use instead we create it under the htdocs of our website which is the one that gets deleted.

How to reproduce

1- Create .well-known directory under htodcs/<site_name>/.well-known
2- A cronjob runs after x amount of time (possibly every month or so, not sure tbh)
3- check for the .well-known dir, It's missing!
4- Re-create the folder again
...

Possible Solution

No idea! :(

Additional Context

No response

*Originally created by @vreoo on 3/12/2024* ### CloudPanel version(s) affected 2.4.0 ### Description On our single WordPress Website, we created `.well-known` Directory inside our `htdocs/<site_name>/.well-known` and the only files we need inside it is the `assetlinks.json` for [Android's Deeplinks](https://developer.android.com/training/app-links/verify-android-applinks), and `apple-app-site-association` for [iOS Deeplinks](https://developer.apple.com/documentation/xcode/supporting-associated-domains). After some time we begin to notice that the deeplinks don't work anymore, and when we check we discover that the whole `.well-known` directory is deleted from the server under the same path I provided previously (`htdocs/<site_name>/.well-known`). We are not sure what is the reason behind this, but after a little research, we knew that a corn job related to the certificate renewal is causing this to happen whenever it runs. We don't have much experience in this regard so we didn't mess around with any configurations or files since we might cause more issues than solving the one we have already. While we were investigating we noticed a configuration line in our Vhost (knowing we didn't mess up or change anything inside it) regarding the `.well-known` directory which says: ``` location ~ /.well-known { auth_basic off; allow all; } ``` It's worth mentioning that there is a `.well-known` directory under the default path `~/` that doesn't get deleted or removed but it's not visible to Google Play or iOS when they try to verify the files associated with this directory. Since they require for the verification that these files are accessible (readable) via: `https://<site_name>/.well-known/assetlinks.json` and the same for the iOS conf file I mentioned at the beginning. So the directory under the default path is not much of a use for us so we don't use instead we create it under the htdocs of our website which is the one that gets deleted. ### How to reproduce 1- Create `.well-known` directory under `htodcs/<site_name>/.well-known` 2- A cronjob runs after x amount of time (possibly every month or so, not sure tbh) 3- check for the `.well-known` dir, It's missing! 4- Re-create the folder again ... ### Possible Solution No idea! :( ### Additional Context _No response_
Sign in to join this conversation.