Reviewboard doesn't work after I update the website directory permisson - review-board

I installed Reviewboard on centos7 through 'yum -y install ReviewBoard'. I cannot access the website after all set. It asks me to update the website directory permission(Manual server updates required). But I have already updated the permission which the owner and group is 'apache'.
I check the logs and no error.
Anyone can help?? thanks.

I did not set the appropriate SELinux booleans or else I installed ReviewBoard to a directory where Apache doesn't have SELinux access permission.
So I disabled SELinux and all worked.

Related

2FA is not working with Ubuntu AWS instance

I worked on setting up 2FA while doing ssh in EC2 instance. But after the setup instance is still not asking for 2FA code and directly logs my user i.e. ubuntu into the server.
I did following steps to setup 2FA:
Install Google Authenticator PAM module.
sudo apt install libpam-google-authenticator
Add auth required pam_google_authenticator.so to /etc/pam.d/sshd
Restart ssh sudo systemctl restart sshd.service
Update sshd_config with following:
ChallengeResponseAuthentication yes PasswordAuthentication no
Run command google-authenticator
Please help me resolve this issue. Thanks in advance.
I was facing this issue because of other configuration was enabled. PubKeyAuthentication was used instead of authenticator. I change it to PubKeyAuthentication no which resolved the issue.

what is the default password for the `jupyter` user on AI platform notebook VMs?

i just tried to install oh-my-zsh on my notebook instance. it asked for the jupyter user's password, but i have no idea.
i'm also tagging with gcp-ai-platform-notebook as the support page says to do. thanks in advance for any help here!
I tried to install oh-my-zsh using “sudo -i" to login as root. It’s installed successfully. So, I would advise you to use “sudo -i” to login as root before installing oh-my-zsh.
You can change the password using the following
sudo passwd <username>
You will require sudo permissions. This can be done by adding Compute Admin role to the service account and restarting the VM

Permission problems when setting active host

I'm setting active host and having Docker client point at it:
docker-machine env [instance name]
That gives me output:
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host. You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'
when I try to regenerate the certs I get this from the debug log: fork/exec /usr/bin/ssh: permission denied
Changing permission settings for the directory didn't help. How can I troubleshoot it ?
Solution found here https://www.digitalocean.com/community/questions/ssh-not-available-when-creating-docker-machine-through-digitalocean
Problem was running Docker as a snap (Ubuntu's repo) instead of official build from Docker. As soon as I uninstalled the Docker snap and installed official build SSH problem has gone away.

Unable to setup Django in production on EC2 instance running Ubuntu 14.04

I have set up an EC2 instance with Ubuntu and able to login via ssh.
Now I have installed Apache, MySQL (worked fine) and Django also tried to configure it to run with apache. I have tried doing so with mod-wsgi but it still shows a apache default page instead of django (Congratulation ! It works) page. Can someone please provide me instructions for how to setup all this after login into EC2 via SSH.
Here is a tutorial provided by Django.
You need to make sure the apache config file is in /etc/apache2/sites-enabled/ or wherever your apache configuration files rest.
Another silly problem and this might be your issue is whenever I start a new instance of EC2 there is always a config called "000-default" already in the apache sites-enabled. This needs to be DELETED or DISABLED for apache to read from your config instead.
Hopefully this helps!
For a example check the Step 2 of this link. yum + git + pip + python requirements

Installing Django, PostgreSQL on Google Compute Engine Debian 7 Instance

I am trying to deploy a Django application on Google Compute Engine. I'm using a Debian 7 image and want to set up Django with Nginx, Gunicorn, virtualenv, supervisor and PostgreSQL. I have everything running fine on my development machine which is running Ubuntu 14.04 with Django installed and PostgreSQL as the backend.
I'm using the tutorial located at http://datacommunitydc.org/blog/2013/12/a-tutorial-for-deploying-a-django-application-that-uses-numpy-and-scipy-to-google-compute-engine-using-apache2-and-modwsgi/. I'm also using the tutorial located at http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/ as it's specific to virtualenv and PostgreSQL which I'm using on my development machine. I've setup my GCE instance, instaled and updated aptitude. I've installed PostgreSQL however when I attempt to create a database user and a new database for the app I get an error and nothing is created.
Following the tutorial I've run:
$ sudo su - postgres
postgres#django:~$ createuser -P
Enter name of role to add: hello_django
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
When it attempts to create the new user role I receive the following error:
createuser: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
When I run the shell script ls /etc/init.d it says that postgresql is running, but I still can't add the new role. Can someone tell me what I'm doing wrong?
Regards.
I wasn't able to reproduce the issue on my end, but it appears to be an issue with PostgreSQL and its dependencies. You can try removing all installed PostgreSQL components and dependencies and then reinstalling PostgreSQL:
sudo apt-get remove --purge postgresql-9.1*
sudo apt-get install postgresql-9.1
If it's still unable to connect to the database, the issue might be originating from your $PATH, in which case you'll need to point it to /usr/local/bin/psql.
I have just had the same problem.
This is most likely cause the postgres cluster has not been initialised yet.
And the reason that this didn't install automatically is because you have set up the locale of the box yet. This is something that has to be done on Amazon EC2 instances as well.
You need to run:
sudo apt-get install locales
And then:
sudo dpkg-reconfigure locales
I had to choose which locales I wanted to setup, I chose en_AU UTF-8.
After this I rebooted, then I could run this to initialise the cluster:
sudo pg_createcluster 9.1 main --start
This started the service and created the pg_hba.conf files etc.
I faced a similar problem a while back. It can resolved using a few simple steps:
As postgres user run : initdb --locale en_US.UTF-8 -E UTF8 -D 'var/lib/postgres/data'. Note depending on the distro postgres in the command can be pgsql. You can easily check if the directory exists with an ls command.
systemctl start postgresql (if you have systemd) or just a /etc/init.d/postgresql start should do. These commands must be rub as the superuser.
All this is from the ArchWiki.