Hansson IT VM - Teil 1

I have been running a Hansson IT VM (40GB) under Vmware Fusion for many months.
Why? Because a separate installation means too much effort for me.
Since the update to 29.0.1 I have had MANY errors.
“Your data directory and files are probably accessible from the Internet. The .htaccess file does not work. It is strongly recommended that you configure your web server so that the data directory is no longer accessible from the Internet or that you move it out of the document root directory of the web server.
3123 Error in the logs since May 19, 2024, 22:20:44
The server does not have a configured start time for the maintenance window. This means that resource-intensive daily background tasks are also executed during your main usage time. We recommend that you set the maintenance window to a time with low usage so that users are less affected by the load of these extensive tasks. For more information, see the documentation .
The PHP module “imagick” is not activated, but the theming app is. In order for the favicon generation to work correctly, you must install and activate this module. You can find more information in the documentation”

All problems that I cannot solve with the Hansson IT config…
And no, I have not made any customizations of my own, but have ONLY selected the options offered.

Translated with DeepL.com (free version)

The reason for these are not errors as such. They are warnings.

With each version releases also comes hardening and security tweaks. The logging and health checks becomes richer and better.

None of the above is something you have to solve to have a working installation. Does your eyes twitch when it sees “errors, warnings”? Sure. But is it crucial to fix in order to still use this? No.

If you would like to get rid of them - and they are not wrong that these are risks and small stuff might not work properly - you will need to get your hands dirty. Compared to installing and setting up from scratch, these things you has to do is very minor.

How do you eat an elephant? One bite at the time. Start with the .htaccess warning. This one requires you to become friends with OCC (there is a an OCC command that very likely will fix your .htaccess warning), hence will make many things easier going forward with Nextcloud.

From a command line prompt I have done this:
This provides you with a full overview of available (documented) commands:

This particular one is especially interesting (the bottom command in this screenshot):

In the VM, they might have set up environment variables for you, so I will provide two variants of below (I have not set up environment variables for all becaue, well, I am lazy and can find my way around):

sudo -u www-data php8.2 /var/www/nextcloud/occ maintenance:update:htaccess

No environment variable

sudo -u www-data php occ maintenance:update:htaccess

Environment variables setup for php and occ - probably very likely configured on your environment. So use sudo -u www-data php occ

Try also to run:

sudo -u www-data php8.2 /var/www/nextcloud/occ maintenance:repair
1 Like

Thank you very much !!

I tried:
sudo -u www-data php8.1 /var/www/nextcloud/occ maintenance:update:htaccess

.htaccess has been updated


But the error still exists… :frowning:

sudo -u www-data php8.1 /var/www/nextcloud/occ maintenance:repair
also doesn’t work :frowning:

You are probably running php-fpm on that box. In that case:

Can you try to see if you got .htaccess and .user.ini in root of the directory by:

ll /var/www/nextcloud/

First of all, thanks again…

root@xxxx:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
ncdata 40090240 38169728 1920512 96% /mnt/ncdata


-rw-r–r-- 1 www-data www-data 5120 May 27 13:40 .htaccess
-rw-r----- 1 root www-data 101 May 23 15:16 .user.ini

and now ?

I get ever 15 minutes an email with:

cannot create snapshots : out of space
no snapshots were created


cannot create snapshots : out of space
no snapshots were created


This system is original from Hansson IT and is only updated by the automated scripts from Hansson IT.
I have not made a single change and still have a lot of problems.


I am sorry, but the scripts and general setups to the VM maintenance itself, is outside of my knowledge.

The .user.ini is not readable

chmod o+r .user.ini

I used the same VM started with v27.0.0 and since v29.0.0 with the same troubles

Check your trusted domains. With “#” switch all of them of and hold your Site actual. Step by step remove the “#” from the domains and if you get your known message, you know the line. Try to work with wildcards like “*”.

For that you must install the imagick php modul to the related php version is installed and maybe also the SVG modul.

FYI the free version of Hansson have now 100 GB, I use this now with NC 29.0.1, has Linux 6 and php 8.3

Thank you !!

I did a fresh install of the free 100GB VM ova-file.

Now it works. For the moment.

But why does the error occur during a new installation?

“Your data directory and your files are probably accessible from the Internet. The .htaccess file is not working.”

Best regards …