These are chat archives for ushahidi/Community

10th
Oct 2018
Arturo
@ArturoQuintana
Oct 10 2018 17:34
@ushbot We have some problems with our Ushahidi instance after applying some changes to our server.
Can someone help us?
in this link http://weblib02.fiu.edu/ you can see what is happening
Ushbot
@ushbot
Oct 10 2018 17:36
[Romina Suarez, Ushahidi] Hi @arturoQuintana, I don’t have a lot of time left today ( around 20m before I need to leave) but I can answer a few questions .
[Romina Suarez, Ushahidi] I just went in there http://weblib02.fiu.edu/ looks like permission/ownership issues?
Arturo
@ArturoQuintana
Oct 10 2018 17:41
thanks @rowasc So, how should the permission structure be?
Ushbot
@ushbot
Oct 10 2018 17:45
[Romina Suarez, Ushahidi] so that dir application/cache
  • has to exist
  • needs to have the apache/nginx group:owner (depending on what you are using)
  • apparently may need an empty file
  • needs to be writable by apache/nginx

[Romina Suarez, Ushahidi] >- needs to have the apache/nginx group:owner (depending on what you are using)
correction to this line: as long as it’s writable by apache (or nginx) it’s fine, it can be that the owner is your user and the group is apache’s (www-data usually), as long as the group can write to it.

sending examples in a min

Arturo
@ArturoQuintana
Oct 10 2018 17:48
cache exist
Ushbot
@ushbot
Oct 10 2018 17:49
[Romina Suarez, Ushahidi] ah cool. So it’s most likely that the web server cannot write to it
[Romina Suarez, Ushahidi] chown -R www-data:www-data application/cache
and then check that the group:owner can write to it
Arturo
@ArturoQuintana
Oct 10 2018 17:50
invalid user: ‘www-data:www-data’
Ushbot
@ushbot
Oct 10 2018 17:50
[Romina Suarez, Ushahidi] what web server are you using?
Arturo
@ArturoQuintana
Oct 10 2018 17:50
apache
Ushbot
@ushbot
Oct 10 2018 17:51
[Romina Suarez, Ushahidi] ps aux|grep apache|grep -v grep run this and check what the user it’s running is
Arturo
@ArturoQuintana
Oct 10 2018 17:52
apache 9891 0.0 0.1 325892 6524 ? S 13:49 0:00 /usr/sbin/httpd -DFOREGROUND
apache 9892 0.0 0.7 1400092 29224 ? Sl 13:49 0:00 /usr/sbin/httpd -DFOREGROUND
apache 9893 0.0 0.8 1493168 31780 ? Sl 13:49 0:00 /usr/sbin/httpd -DFOREGROUND
apache 9894 0.0 0.5 1228604 21504 ? Sl 13:49 0:00 /usr/sbin/httpd -DFOREGROUND
Ushbot
@ushbot
Oct 10 2018 17:53
[Romina Suarez, Ushahidi] ah then it’s apache instead of www-data
Arturo
@ArturoQuintana
Oct 10 2018 17:53
i did it
and it still does not work
Ushbot
@ushbot
Oct 10 2018 17:53
[Romina Suarez, Ushahidi] neat. The error changed, but now it’s a matter of doing the same for the logs folder
Arturo
@ArturoQuintana
Oct 10 2018 17:54
ErrorException [ 2 ]: mkdir(): Permission denied ~ SYSPATH/classes/Kohana/Log/File.php [ 69 ]
Should everything be assigned to apache inside the application folder?
even the application folder?
Ushbot
@ushbot
Oct 10 2018 17:57
[Romina Suarez, Ushahidi] yes and no. Apache should be able to read all the php files, but not write / execute them
[Romina Suarez, Ushahidi] and apache should be able to write to the logs and cache directories (this part you did already)
Arturo
@ArturoQuintana
Oct 10 2018 17:57
-rw-r--r--. 1 root root 3814 Sep 7 19:30 bootstrap.php
drwxr-xr-x. 2 apache apache 4096 Sep 28 14:35 cache
drwxr-xr-x. 12 root root 4096 Sep 28 14:35 classes
drwxr-xr-x. 3 root root 4096 Sep 28 14:35 config
-rw-r--r--. 1 root root 3163 Sep 7 19:30 kohana.php
drwxr-xr-x. 5 apache apache 4096 Sep 28 14:36 logs
drwxr-xr-x. 4 root root 4096 Sep 28 14:37 media
drwxr-xr-x. 2 root root 4096 Sep 28 14:37 messages
-rw-r--r--. 1 root root 640 Sep 7 19:30 phinx.php
drwxr-xr-x. 2 root root 4096 Sep 28 14:37 routes
drwxr-xr-x. 5 root root 4096 Sep 28 14:37 views
As you can see, "root user" is the one who has the control mainly
Ushbot
@ushbot
Oct 10 2018 18:00
[Romina Suarez, Ushahidi] oh. Yes ok so, what I see there is that only g: root u:root can read those directories and files (except logs and cache) .
Apache should be able to read them, so change their group to apache and their owner can continue being root .
[Romina Suarez, Ushahidi] and then you should probably make it so that xr is actually r for the group permissions
Arturo
@ArturoQuintana
Oct 10 2018 18:01
ok
Ushbot
@ushbot
Oct 10 2018 18:02
[Romina Suarez, Ushahidi] cool so now you only need to fix the .ENV file in platform to use the correct db settings
Arturo
@ArturoQuintana
Oct 10 2018 18:07
ok
now new errors
we keep the DB configuration
however, we are getting this:
title": "mysqli::construct(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO)",
"message": "mysqli::
construct(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO)",
Ushbot
@ushbot
Oct 10 2018 19:38
[Invoq John Majone] Hi all, does anyone know how to build the v2 android app using aandroid studio?