I uninstalled and reinstalled the ownCloud for Home app and now when I'm at the OwnCloud X setup screen, I get an error "The username is already being used" and I can't get past this page.
Any suggestions to get past this?
I have no problem resetting everything.
I'd just like to get it working.
Any suggestions to get past this?
I have no problem resetting everything.
I'd just like to get it working.
Share this post:
Responses (18)
-
Accepted Answer
It looks like with the upgrade comes a new admin table we didn't know about...I can't find much information on it, however, the following seemst to do the trick.
Edit:
/usr/clearos/apps/owncloud/deploy/uninstall and add to the end of the file:
$MYSQL -uroot -p"$ROOTPASS" -e "DELETE FROM oc_accounts WHERE user_id=\"admin\";" $APP_DB_NAME >/dev/null 2>&1
logger -p local6.notice -t installer "app-owncloud-core - removing oc_accounts admin"
Now run that script:
/usr/clearos/apps/owncloud/deploy/uninstall
Then create a new admin:
/usr/bin/sudo -u apache /opt/rh/rh-php71/root/usr/bin/php /usr/share/owncloud/occ user:add admin
Refresh the page and see if everything checks out OK.
!!! If you're using owncloud Business for ClearOS, the paths to the uninstall script above change from 'owncloud' to 'owncloud_business'.
If you could report back here your mileage, then I'll incorporate the fixes into the next update.
Thanks.
B -
Accepted Answer
No luck
Logged in as root...
This was already in - /usr/clearos/apps/owncloud/deploy/uninstall
$MYSQL -uroot -p"$ROOTPASS" -e "DELETE FROM oc_accounts WHERE user_id=\"admin\";" $APP_DB_NAME >/dev/null 2>&1
logger -p local6.notice -t installer "app-owncloud-core - removing oc_accounts admin"
I ran
/usr/clearos/apps/owncloud/deploy/uninstall
When I ran
/usr/bin/sudo -u apache /opt/rh/rh-php71/root/usr/bin/php /usr/share/owncloud/occ user:add admin
I got
Cannot write into "config" directory!
This can usually be fixed by giving the webserver write access to the config directory
See https://doc.owncloud.org/server/10.0/go.php?to=admin-dir_permissions -
Accepted Answer
This was already in - /usr/clearos/apps/owncloud/deploy/uninstall
OK...I pushed up an update that you must have grabbed.
Cannot write into "config" directory!
This can usually be fixed by giving the
Hmm...that was fixed and nobody should have received that update. Please run:
chgrp apache /etc/owncloud
And re-run the admin creation command.
B. -
Accepted Answer
-
Accepted Answer
unfortunately, I ran
chgrp apache /etc/owncloud
before reading that you just wanted the ls
So, of course, it now says
drwxrwxr-x 2 apache apache 4096 Aug 29 22:25 /etc/owncloud
And the create admin command gives
Cannot write into "config" directory!
This can usually be fixed by giving the webserver write access to the config directory
See https://doc.owncloud.org/server/10.0/go.php?to=admin-dir_permissions -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
Ok... that's done.
ls -l /etc/owncloud/config.php
-rw-r----- 1 apache apache 602 Aug 30 21:24 /etc/owncloud/config.php
But now I see this:
/usr/bin/sudo -u apache /opt/rh/rh-php71/root/usr/bin/php /usr/share/owncloud/occ user:add admin
ownCloud is not installed - only a limited number of commands are available
There are no commands defined in the "user" namespace.
And the page still says "The username is already being used" -
Accepted Answer
Bryan,
We've done dozens of upgrades in the lab before releasing the upgrade...Not sure what happened in your case. Since you mentioned you don't have any issue doing a complete reset, let's just go nuclear and start again.
yum remove owncloud-files
rm -rf /etc/clearos/owncloud.conf
rm -rf /usr/share/owncloud
/usr/clearos/sandbox/usr/bin/mysql -uroot -p$(sed "s/password\s*=\s*//" < /var/clearos/system_database/root) -e "DROP DATABASE owncloud"
rm -rf /var/clearos/system_database/owncloud
rm -rf /var/clearos/owncloud
rm -rf /etc/owncloud
yum clean all
yum install app-owncloud
That should do it, I think.
B. -
Accepted Answer
-
Accepted Answer
I don't really know what I'm doing but... Does this mean the database doesn't exist?
usr/clearos/sandbox/usr/bin/mysql -uroot -p$(sed "s/password\s*=\s*//" < /var/clearos/system_database/root)
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 445
Server version: 5.5.56-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> select database();
+------------+
| database() |
+------------+
| NULL |
+------------+
1 row in set (0.03 sec)
MariaDB [(none)]>
-
Accepted Answer
-
Accepted Answer
Ok... google helped.
[root@gateway /]# /usr/clearos/sandbox/usr/bin/mysql -uroot -p$(sed "s/password\s*=\s*//" < /var/clearos/system_database/root)
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 446
Server version: 5.5.56-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| owncloud |
| performance_schema |
| reports |
+--------------------+
5 rows in set (0.00 sec)
MariaDB [(none)]> drop database owncloud;
Query OK, 54 rows affected (0.97 sec)
MariaDB [(none)]> drop database owncloud;
Query OK, 54 rows affected (0.97 sec)
-
Accepted Answer
I tell you... I have no luck.
Followed all the steps... now I see this on the ownCloud config page and can't get past it.
Error
Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000][1045] Access denied for user 'owncloud'@'localhost' (using password: YES) -
Accepted Answer
I'm not able to figure out how to get it working.
I've "gone nuclear" and removed everything as described.
I've dropped the owncloud database.
But every time i reinstall it, I get the error on the owncloud config page:
Error
Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000][1045] Access denied for user 'owncloud'@'localhost' (using password: YES)
Did some googling and found some instructions about granting privileges, but not really sure if that's correct.
So, it's uninstalled for now. -
Accepted Answer
Sorry.
There was a typo (-i should have been -e to drop the db) and I missed deleting a very important file/folder that was leaving by an old autoconfig.php which would ruined things. Here's the updated delete script:
yum remove owncloud-files
rm -rf /etc/clearos/owncloud.conf
rm -rf /usr/share/owncloud
/usr/clearos/sandbox/usr/bin/mysql -uroot -p$(sed "s/password\s*=\s*//" < /var/clearos/system_database/root) -e "DROP DATABASE owncloud"
rm -rf /var/clearos/system_database/owncloud
rm -rf /var/clearos/owncloud
rm -rf /etc/owncloud
yum clean all
yum install app-owncloud
Does that help? -
Accepted Answer
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »