# Home storage for user not writable

**URL:** <https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831>\
**Category:** ℹ️ Support\
**Created:** [March 30, 2017, 9:36am UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831 "2017-03-30T09:36:23Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![staffcpt](https://help.nextcloud.com/letter_avatar/staffcpt/32/6_22734026db12803ebb3e059622ac3534.png) [@staffcpt](https://help.nextcloud.com/u/staffcpt)\
**Post date:** [March 30, 2017, 9:36am UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/1 "2017-03-30T09:36:24Z")

</div>

Hi,

I have one problem with one user.

If run command sudo -u www-data php /var/www/nextcloud/occ files:scan user  
i have : Home storage for user … not writable  
Just for only user  
In the web client he have this message (you do not have permission…)

I look in my folder /var/www/nextcloud/apps/files\_sharing/lib/ this file SharedStorage.php and i have the patch.  
I delete this user and recreate but i have the same problem.  
I delete this folder but i have the same problem.

For other user he don’t have a problem, just for one.

I use a connection with LDAP for my user.

Can you give me a piste for find a solution?

## Thanks

Nextcloud version _(eg, 11.0.2)_:  
Operating system and version _(eg, debian 8)_:  
Apache or nginx version _(eg, Apache_ 2.4.10-10)  
PHP version _(eg, 5.6.26)_:  
Is this the first time you’ve seen this error?:  
No I have the same error with nexcloud 10.0.1, 10.0.3

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

\<?php $CONFIG = array ( 'instanceid' =\> 'ocphkhzawzsi', 'passwordsalt' =\> '', 'secret' =\> '', 'trusted\_domains' =\> array ( 0 =\> 'ip', 1 =\> 'name 1', 2 =\> 'name 2, ), 'datadirectory' =\> '/nextcloud-data/', 'overwrite.cli.url' =\> 'url', 'dbtype' =\> 'mysql', 'version' =\> '11.0.2.7', 'dbname' =\> 'nextcloud', 'dbhost' =\> 'sql', 'dbport' =\> '', 'dbtableprefix' =\> 'oc\_', 'dbuser' =\> ', 'dbpassword' =\> '', 'logtimezone' =\> 'UTC', 'installed' =\> true, 'ldapIgnoreNamingRules' =\> false, 'ldapProviderFactory' =\> '\\OCA\\User\_LDAP\\LDAPProviderFactory', 'mail\_smtpmode' =\> 'smtp', 'mail\_smtphost' =\> '', 'mail\_smtpport' =\> '', 'mail\_from\_address' =\> ', 'mail\_domain' =\> '', 'memcache.local' =\> '\\OC\\Memcache\\APCu', 'maintenance' =\> false, 'loglevel' =\> 3, 'trashbin\_retention\_obligation' =\> 'auto', 'updater.secret' =\> '', );

---

<div class="post-metadata">

**Author:** ![staffcpt](https://help.nextcloud.com/letter_avatar/staffcpt/32/6_22734026db12803ebb3e059622ac3534.png) [@staffcpt](https://help.nextcloud.com/u/staffcpt)\
**Post date:** [March 31, 2017, 12:50pm UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/2 "2017-03-31T12:50:20Z")

</div>

Hi

After modify the numeric\_id entry on oc\_storage table.  
This ok

best regards

---

<div class="post-metadata">

**Author:** ![deppy82](https://help.nextcloud.com/letter_avatar/deppy82/32/6_22734026db12803ebb3e059622ac3534.png) [@deppy82](https://help.nextcloud.com/u/deppy82)\
**Post date:** [February 13, 2019, 8:34am UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/3 "2019-02-13T08:34:50Z")

</div>

Hi

I have the same problem with a similar configuration (LDAP Users) with my nextcloud installation. I read that you found a solution modifying the numeric\_id on the oc\_storage table… Can you be more detailed please? Have you simply changed the id of users with unused ones or you have aligned them accordind to another table?

Thank you in advance for your reply

---

<div class="post-metadata">

**Author:** ![jolly-jump](https://help.nextcloud.com/letter_avatar/jolly-jump/32/6_22734026db12803ebb3e059622ac3534.png) [@jolly-jump](https://help.nextcloud.com/u/jolly-jump)\
**Post date:** [March 4, 2019, 12:31pm UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/4 "2019-03-04T12:31:57Z")

</div>

Hi,

had the same problem today.  
I had deleted files in the data-directory and had forgotten to deactivate the cron-job. In the end there are probably some references to files or folders that do not match in the database.

I had to remove the ldap-users (change the ldap-search string so that the user was not found anymore)

- occ ldap:check-user “culprit”
- occ user:delete “culprit”
- then execute the cron-script and move the files
- then reactivate the user

I also tried deleting various rows in the database which seem to stay in the database even after deletion, but they are not connected to the problem.  
I have to admit: after the procedure i still have 7 out of 50 users where the problem persists. I am trying again.

Cheers,

---

<div class="post-metadata">

**Author:** ![jolly-jump](https://help.nextcloud.com/letter_avatar/jolly-jump/32/6_22734026db12803ebb3e059622ac3534.png) [@jolly-jump](https://help.nextcloud.com/u/jolly-jump)\
**Post date:** [March 4, 2019, 3:42pm UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/5 "2019-03-04T15:42:22Z")

</div>

I re-did the steps.  
What was definitely necessary was a “delete:user”, which needs a ldap:check-user first, which needs the username first to be gone from the search string.  
So, executing the cron-script was not necessary.

So once more:

- using !(uid=culprit) make it disappear for the system
- occ ldap:check-user “culprit”
- occ user:delete “culprit”
- let the culprit appear in the system again
- then as cloudadmin browse to “users” and search for it, which makes it show again
- now files:scan “culprit” works.

Think some things are wrong somewhere. This is very annoying.

---

<div class="post-metadata">

**Author:** ![steinbach](https://help.nextcloud.com/letter_avatar/steinbach/32/6_22734026db12803ebb3e059622ac3534.png) [@steinbach](https://help.nextcloud.com/u/steinbach)\
**Post date:** [June 2, 2019, 1:49pm UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/6 "2019-06-02T13:49:07Z")

</div>

For me, the problem was that the `files` directory in the data directory of the user was missing. I previously deleted it assuming Nextcloud would automatically recreate missing directories. So I did it manually.

---

<div class="post-metadata">

**Author:** ![Chris\_Dean](https://help.nextcloud.com/user_avatar/help.nextcloud.com/chris_dean/32/17007_2.png) [@Chris\_Dean](https://help.nextcloud.com/u/Chris_Dean)\
**Post date:** [August 12, 2019, 10:30am UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/7 "2019-08-12T10:30:08Z")

</div>

Had exactly the same issue and solution as @steinbach - easily resolved by adding the files folder back into the users data dir - would be good however if NC picked this up and tried to recreate where it did not exist as part of occ files:scan

---

<div class="post-metadata">

**Author:** ![pei](https://help.nextcloud.com/letter_avatar/pei/32/6_22734026db12803ebb3e059622ac3534.png) [@pei](https://help.nextcloud.com/u/pei)\
**Post date:** [October 1, 2020, 9:07pm UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/8 "2020-10-01T21:07:35Z")

</div>

This is also how I solved my “Home storage for user not writable”.

In this case the error message is a bit misleading and should be “files subdir not found.”

Thanks for the hint.

---

<div class="post-metadata">

**Author:** ![adi-dev](https://help.nextcloud.com/user_avatar/help.nextcloud.com/adi-dev/32/1411_2.png) [@adi-dev](https://help.nextcloud.com/u/adi-dev)\
**Post date:** [October 26, 2020, 1:49pm UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/9 "2020-10-26T13:49:59Z")

</div>

I just found that running `occ filesystem:scan --all` throws that error on my installation, only for one user, no LDAP used here. I checked that this user’s home folder is empty, so I deleted the user from web page, made sure, the folder is gone and re-created with the same name just to find out it throws the same error.  
Nextcloud 20.0.0  
PHP 7.4.11  
PostgreSQL 12.4  
Everything on one PC - Ubuntu x64

---

<div class="post-metadata">

**Author:** ![moutonjr](https://help.nextcloud.com/letter_avatar/moutonjr/32/6_22734026db12803ebb3e059622ac3534.png) [@moutonjr](https://help.nextcloud.com/u/moutonjr)\
**Post date:** [October 26, 2020, 2:26pm UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/10 "2020-10-26T14:26:21Z")

</div>

Hi there,

I noticed this error on my instnce as well. It looks interesting when it comes from LDAP users who haven’t logged in yet.  
=\> They have an account but no target home dir if not created.

This is a prompt bug then. It should look for HOME dir, if ENOENT then it should be another error prompt.

---

<div class="post-metadata">

**Author:** ![fweng322](https://help.nextcloud.com/user_avatar/help.nextcloud.com/fweng322/32/6637_2.png) [@fweng322](https://help.nextcloud.com/u/fweng322)\
**Post date:** [November 8, 2020, 1:32am UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/11 "2020-11-08T01:32:31Z")

</div>

Hi,

In my case, occ files:scan --all would return such errors for certain users, which may have never logged in (therefore?) have nothing in their home folder (even no cache/ files/ … etc). I wonder if it is the correct behavior or the correct error messages to show…

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 2, 2024, 1:02pm UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/12 "2024-12-02T13:02:03Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 4, 2024, 1:15pm UTC](https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/13 "2024-12-04T13:15:51Z")

</div>


