alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.48k stars 213 forks source link

Cannot create or write into the data directory /share/nextcloud #90

Closed glorifiedg closed 2 years ago

glorifiedg commented 2 years ago

I'm trying this addon for the first time and I always get this error on creation: Cannot create or write into the data directory /share/nextcloud

What am I doing wrong?

alexbelgium commented 2 years ago

Hi, probably a error with folde creation, does the folder /share/nextcloud exists?

glorifiedg commented 2 years ago

yes, it was created automaticaly but with no content at all.

alexbelgium commented 2 years ago

Could you paste the full addon log please? thanks!

glorifiedg commented 2 years ago

`You are running the latest version of this add-on. System: Home Assistant OS 6.6 (amd64 / qemux86-64) Home Assistant Core: 2021.11.4 Home Assistant Supervisor: 2021.10.8

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat. https://github.com/alexbelgium/hassio-addons

[cont-init.d] 00-banner.sh: exited 0. [cont-init.d] 01-envfile: executing... [cont-init.d] 01-envfile: exited 0. [cont-init.d] 10-adduser: executing...

      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support LSIO projects visit: https://www.linuxserver.io/donate/

GID/UID

User uid: 1000 User gid: 1000

[cont-init.d] 10-adduser: exited 0. [cont-init.d] 20-config: executing... [cont-init.d] 20-config: exited 0. [cont-init.d] 30-keygen: executing... [17:16:09] INFO: Using referenced ssl certificates... ... checking if referenced files exist ... adding ssl certs in files [17:16:09] INFO: ... done [cont-init.d] 30-keygen: exited 0. [cont-init.d] 40-config: executing... chown: cannot access '/data/config/nextcloud/config': No such file or directory chown: cannot access '/data/config/nextcloud/data': No such file or directory rm: cannot remove '/data/config/www/nextcloud/assets': No such file or directory [cont-init.d] 40-config: exited 0. [cont-init.d] 50-install: executing... [cont-init.d] 50-install: exited 0. [cont-init.d] 60-memcache: executing... [cont-init.d] 60-memcache: exited 0. [cont-init.d] 70-aliases: executing... [cont-init.d] 70-aliases: exited 0. [cont-init.d] 90-custom-folders: executing... [cont-init.d] 90-custom-folders: exited 0. [cont-init.d] 99-custom-files: executing... [custom-init] no custom files found exiting... [cont-init.d] 99-custom-files: exited 0. [cont-init.d] 99-elasticsearch: executing... [17:16:10] WARNING: It seems there is no Nextcloud server installed. Please restart the addon after initialization of the user. [cont-init.d] 99-elasticsearch: exited 0. [cont-init.d] 99-ocr: executing... [17:16:10] WARNING: It seems there is no Nextcloud server installed. Please restart the addon after initialization of the user. [cont-init.d] 99-ocr: exited 0. [cont-init.d] 99-trusted_domains: executing... [17:16:11] WARNING: It seems there is no Nextcloud server installed. Please restart the addon after initialization of the user. [cont-init.d] 99-trusted_domains: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. {"reqId":"FbsXDlyLnsq0RvV64Wtl","level":3,"time":"2021-11-18T17:20:00+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Not installed","userAgent":"--","version":"","exception":{"Exception":"Exception","Message":"Not installed","Code":0,"Trace":[{"file":"/data/config/www/nextcloud/lib/base.php","line":649,"function":"checkInstalled","class":"OC","type":"::"},{"file":"/data/config/www/nextcloud/lib/base.php","line":1089,"function":"init","class":"OC","type":"::"},{"file":"/data/config/www/nextcloud/cron.php","line":42,"args":["/data/config/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/data/config/www/nextcloud/lib/base.php","Line":277,"CustomMessage":"--"}} Exception: Not installed in /data/config/www/nextcloud/lib/base.php:277 Stack trace:

0 /data/config/www/nextcloud/lib/base.php(649): OC::checkInstalled()

1 /data/config/www/nextcloud/lib/base.php(1089): OC::init()

2 /data/config/www/nextcloud/cron.php(42): require_once('/data/config/ww...')

3 {main}

{"reqId":"cexI55dUWyT4p5XyqjOL","level":3,"time":"2021-11-18T17:25:00+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Not installed","userAgent":"--","version":"","exception":{"Exception":"Exception","Message":"Not installed","Code":0,"Trace":[{"file":"/data/config/www/nextcloud/lib/base.php","line":649,"function":"checkInstalled","class":"OC","type":"::"},{"file":"/data/config/www/nextcloud/lib/base.php","line":1089,"function":"init","class":"OC","type":"::"},{"file":"/data/config/www/nextcloud/cron.php","line":42,"args":["/data/config/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/data/config/www/nextcloud/lib/base.php","Line":277,"CustomMessage":"--"}} Exception: Not installed in /data/config/www/nextcloud/lib/base.php:277 Stack trace:

0 /data/config/www/nextcloud/lib/base.php(649): OC::checkInstalled()

1 /data/config/www/nextcloud/lib/base.php(1089): OC::init()

2 /data/config/www/nextcloud/cron.php(42): require_once('/data/config/ww...')

3 {main}

{"reqId":"OCJLEMsJCkecYEI5HQDp","level":3,"time":"2021-11-18T17:30:00+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Not installed","userAgent":"--","version":"","exception":{"Exception":"Exception","Message":"Not installed","Code":0,"Trace":[{"file":"/data/config/www/nextcloud/lib/base.php","line":649,"function":"checkInstalled","class":"OC","type":"::"},{"file":"/data/config/www/nextcloud/lib/base.php","line":1089,"function":"init","class":"OC","type":"::"},{"file":"/data/config/www/nextcloud/cron.php","line":42,"args":["/data/config/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/data/config/www/nextcloud/lib/base.php","Line":277,"CustomMessage":"--"}} Exception: Not installed in /data/config/www/nextcloud/lib/base.php:277 Stack trace:

0 /data/config/www/nextcloud/lib/base.php(649): OC::checkInstalled()

1 /data/config/www/nextcloud/lib/base.php(1089): OC::init()

2 /data/config/www/nextcloud/cron.php(42): require_once('/data/config/ww...')

3 {main}

Exception: Not installed in /data/config/www/nextcloud/lib/base.php:277 Stack trace:

0 /data/config/www/nextcloud/lib/base.php(649): OC::checkInstalled()

1 /data/config/www/nextcloud/lib/base.php(1089): OC::init()

2 /data/config/www/nextcloud/cron.php(42): require_once('/data/config/ww...')

3 {main}

{"reqId":"vzLUGkvqhMAtN7PQ99WS","level":3,"time":"2021-11-18T17:35:00+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Not installed","userAgent":"--","version":"","exception":{"Exception":"Exception","Message":"Not installed","Code":0,"Trace":[{"file":"/data/config/www/nextcloud/lib/base.php","line":649,"function":"checkInstalled","class":"OC","type":"::"},{"file":"/data/config/www/nextcloud/lib/base.php","line":1089,"function":"init","class":"OC","type":"::"},{"file":"/data/config/www/nextcloud/cron.php","line":42,"args":["/data/config/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/data/config/www/nextcloud/lib/base.php","Line":277,"CustomMessage":"--"}}`

alexbelgium commented 2 years ago

mmh so it says that it is not installed, which is logical at this stage. And when you open the webUI, there is nothing?

glorifiedg commented 2 years ago

all normal for a first install. The error is here, when I try to create the conf screenshot-192 168 1 140_8099-2021 11 18-17_46_26 ig

alexbelgium commented 2 years ago

and when you click on Armazenamoento e bse de dados, it shows /share/nextcloud? the error occurs when it tries to create the base?

If yes, I think I see the issue I'll see how to correct that

glorifiedg commented 2 years ago

Yes, the storage is located pointed to /share/nextcloud (I acessed with samba and there is a folder in /share/nextcloud)

alexbelgium commented 2 years ago

Thanks, I've pushed a new version we'll see if it helps... The only reason I see that it wouldn't be accessible would be for accesses reasons, so I've modified the code to chown it to the current user. I'll test it on my side also

alexbelgium commented 2 years ago

Hi, it is solved in addon 22.2.3-3. Thanks fir reporting!

glorifiedg commented 2 years ago

Thank you! Not sure if I know how to test it before the release shows in HA! X)

alexbelgium commented 2 years ago

I'm sure it works because I was able to replicate the issue and find the source (a misplaced character while improving the code at last version)... Thanks for the reflex of test before production though :)

glorifiedg commented 2 years ago

Working without issues! Thank you so much!

alexbelgium commented 2 years ago

Thanks for the feedback!