# Nextcloud Data Directory Protected Wont Login

**URL:** <https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456>\
**Category:** Existing Apps\
**Tags:** nextcloud\
**Created:** [14 July 2024 12:55 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456 "2024-07-14T12:55:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![marxistvegan](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/marxistvegan/32/22_2.png) [@marxistvegan](https://syncloud.discourse.group/u/marxistvegan)\
**Post date:** [14 July 2024 12:55 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456/1 "2024-07-14T12:55:47Z")

</div>

Hey,

My nextcloud has been a little wonky after the 29 upgrade. I can get a load screen to login but then get an internal error message on the site. I ssh’d in and ran occ setupchecks and came up with this message

> Data directory protected: Could not check that the data directory is protected. Please check manually that your server does not allow access to the data directory.  
> To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its `trusted_domains` or the `overwrite.cli.url`.

I found a ticket that might be related on nextcloud’s github [[Bug]: 'Data directory protected' check failing · Issue #45087 · nextcloud/server · GitHub](https://github.com/nextcloud/server/issues/45087)

I will sent logs after this message 🙂 via email.

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [14 July 2024 17:00 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456/2 "2024-07-14T17:00:18Z")

</div>

Actually this message is not related to the login issue, I have the same message and I am trying to find the solution still, but it does not prevent me from anything.

Also nothing is in the logs.

Can you show the actual login error you get (send to support if it has any private info)?

---

<div class="post-metadata">

**Author:** ![marxistvegan](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/marxistvegan/32/22_2.png) [@marxistvegan](https://syncloud.discourse.group/u/marxistvegan)\
**Post date:** [15 July 2024 01:30 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456/3 "2024-07-15T01:30:50Z")

</div>

yeah I can, getting this error after logging in

 ![Screenshot_20240714-213250](https://global.discourse-cdn.com/free1/uploads/syncloud/original/1X/36017c56c96c34c026d042086c618a53a128db1c.png)

---

<div class="post-metadata">

**Author:** ![marxistvegan](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/marxistvegan/32/22_2.png) [@marxistvegan](https://syncloud.discourse.group/u/marxistvegan)\
**Post date:** [15 July 2024 03:22 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456/4 "2024-07-15T03:22:12Z")

</div>

adding an odd thing which is that my dav connections still work. just apparently web access is not working

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [15 July 2024 06:36 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456/5 "2024-07-15T06:36:09Z")

</div>

What happens if you click this left arrow?

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [15 July 2024 08:12 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456/6 "2024-07-15T08:12:23Z")

</div>

> Data directory protected

By the way fix tor that is coming later today, let’s see if it helps to understand your issue better.

---

<div class="post-metadata">

**Author:** ![marxistvegan](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/marxistvegan/32/22_2.png) [@marxistvegan](https://syncloud.discourse.group/u/marxistvegan)\
**Post date:** [15 July 2024 11:28 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456/7 "2024-07-15T11:28:23Z")

</div>

sorry that was screen shot from my phone just the back arrow

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [15 July 2024 21:09 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456/8 "2024-07-15T21:09:23Z")

</div>

I’ve pished the update, can you upgrade and try again?  
Also can you send logs right after you get the error one more time?

---

<div class="post-metadata">

**Author:** ![marxistvegan](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/marxistvegan/32/22_2.png) [@marxistvegan](https://syncloud.discourse.group/u/marxistvegan)\
**Post date:** [15 July 2024 22:30 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456/9 "2024-07-15T22:30:33Z")

</div>

ok did the update. Used incognito to log in and then got the same internal error. Logs just sent

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [16 July 2024 08:16 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456/10 "2024-07-16T08:16:54Z")

</div>

Can you ssh and run occ setupchecks again please?

---

<div class="post-metadata">

**Author:** ![marxistvegan](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/marxistvegan/32/22_2.png) [@marxistvegan](https://syncloud.discourse.group/u/marxistvegan)\
**Post date:** [16 July 2024 17:29 UTC](https://syncloud.discourse.group/t/nextcloud-data-directory-protected-wont-login/456/11 "2024-07-16T17:29:50Z")

</div>

Not sure what happened… however it seems to let me log in successfully. I did rerun the chown on my data directory last night, but even after that it did not work, but randomly decided to try today from work and it now works.
