Owncloud installation / setting up the admin account doesnt work


#1

Hey guys,
i configured all right to the step where i open the link to https://mydomain.com/owncloud to finish the setup of owncloud.
The problem is, i cant finish it cause i get this error at the top of the box where i type the username and password in when i try to finish the installation. Error while trying to create admin user: An exception occurred while executing 'ALTER TABLE occalendarsubscriptions CHANGE lastmodified lastmodified INT UNSIGNED DEFAULT NULL NOT NULL':_
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'lastmodified'
I dont know what i have to do now, to resolve it. Maybe someone of you can help me.
I'm using Ubuntu 16.04.3 LTS and nginx webserver / mariaDB.

Best regards


Can't even perform basic install?
#2

Are you using ownCloud 10?

Try this:

ALTER TABLE oc_dav_shares ADD publicuri VARCHAR(255) NOT NULL AFTER principaluri;


#3

Yes im using 10.0.3
I tried your statement i get the same error :confused:
I found at github that issue https://github.com/owncloud/core/issues/28695 I dont know if it has something to do with that.


#4

Wow, you are better at finding the solution than me :slight_smile:

Yes, it seems that it's a bug. hope it will be fixed soon.

Do you have a fresh install or are you doing an upgrade?


#5

Hehe :sunglasses: that sucks i need that for my graduation project :wink:
Yes its a fresh install.
Can i try to install v9 as workaround and upgrade later or should i wait ?


#6

What version are you installing now? 10.0.3 or 10.0.2 or 10.0.1?


#7

10.0.3 i wrote it in my second post :wink:


#8

Sorry can't read :smiley:


#9

After consulting with the experts, a have a question for you:

Can you recreate this error?

We had it once, and could not recreate it since.

My advice would be - try a reinstall, and write your steps down. If you run in to the same error - please let us know


#10

I can try a reinstall tomorrow and writing down the steps.
When i get again the error or the reinstall fixed it for me - i let you know.
Thanks dmitry.


#11

Thanks :slight_smile:


#12

also, just a tip, you don't have to make the final step of the installation on the web UI, you can write a script.

cd /var/www/owncloud

sudo -u www-data php occ maintenance:install \
   --database "mysql" --database-name "owncloud" \
   --database-user "admin" --database-pass "password" \
   --admin-user "admin" --admin-pass "password"

#13

I can try that tomorrow :wink: I'm not at work anymore to test that, but yes maybe that is a solution. I let you know bro


#14

cd /var/www/owncloud

sudo -u www-data php occ maintenance:install \
--database "mysql" --database-name "owncloud" \
--database-user "admin" --database-pass "password" \
--admin-user "admin" --admin-pass "password"

I just tried it, i get the same error massage like in my opening post.
I reinstall it now.


#15

I could solve it with installing Owncloud 9.
I dropped the database and user from mysql and reinstalled it with the following cmdlets:

rm -r /var/www/owncloud/
mkdir -p /var/www/owncloud
wget https://download.owncloud.org/community/owncloud-9.0.2.tar.bz2
tar -xjf owncloud-9.0.2.tar.bz2 -C /var/www
chown -R www-data:www-data /var/www/owncloud
chown -R www-data:www-data /var/owncloud_data
mysql -u root -p
create database owncloud_db;
create user owncloud_db_user@localhost identified by 'mypw';
grant all privileges on owncloud_db.* to owncloud_db_user@localhost;
flush privileges;

then i went into the browser and finished the setup with the webUI without any problem.


#16

Could you try to install 10.0.3 or 9.1.6 again?

And then write down your steps, if they are different from what you already done.


#17

Sure i try it again with 10.0.3 now to maybe reproduce this error.


#18

Thank you :slight_smile:


#19

Ok i did the same steps with 10.0.3 like i did with 9.0.2 and i get the same error from my opening post again. Seems its a bug on this version. I try now 9.1.6 again. ^^


#20

This is your data dir I suppose. Have you adjusted your config.php and oc_storages accordingly?

The config.php is in /owncloud/configuration/config.php

Edit: Just wondering, why is your data dir outside of your ownCloud dir? What advantages does it bring you?