If you’ve never heard of NextCloud, do yourself a favor and fill that huge gap by taking a look here: in very short words, we’re talking about an open-source File Sync and Share solution that basically allows any Enterprise to build their very own Dropbox-like (or Google-Driveish) space to securely keep their data under control.
Once installed, it will works just like a standard cloud-storage SaaS solutions like the one mentioned above… except it’s not a SaaS! Meaning that you’ll be able to install it on your own servers and handle everything on your own, without having to include a third-party host acting as a data processor in your ISO27001 or GDPR compliance papers.
In this post we’ll talk about a minor issue which can affect a NextCloud installation on a typical Linux server, such as CentOS, Fedora, Debian, Ubuntu, RHEL and the likes. The problem is a nasty Login Page Redirect Loop, which basically means that you are unable to log-in.
This issue can happen regardless of what you’re using: PHP 5 or PHP7, Apache or Nginx, and so on.
Luckily enough, the fix is most likely around the corner: you just have to fix the access permissions on some of your folders, such as the following:
chown nginx:nginx /var/www/nextcloud/
chown nginx:nginx /var/lib/php/session/
chown root:nginx /var/lib/php/wsdlcache/
chown root:nginx /var/lib/php/opcache/
These console commands are good if you’ve installed NextCloud on the /var/www/nextcloud/ folder and if you’re using Nginx with its default nginx user. If you’re using a different folder and/or web server (such as Apache) and/or user, replace the values accordingly before running these commands!
As soon as you do that, remember to clear your browser’s cookies and try again: hopefully, you’ll be able to see the following…
… Meaning that you’re good to go!
That’s it: I sincerely hope that this small guide will help those who’re struggling with this nasty issue!