Owncloud trusted domains since ucs 5 or since new version of owncloud

Hey,
I’m a relatively new to owncloud through univention appliance.
In the past, including usc 4, when I wanted to configure the trusted domains, I did the following via putty ssh:
login to the console.
writing the folowing commands:
switch into the container : univention-app shell owncloud
install an editor: apt install vim
Lastly vim /var/lib/univention-appcenter/apps/owncloud/conf
Then I simply edit the config.php

image

This worked perfect until update to ucs 5 or maybe until more updated owncloud versions

Form then forwards, editing the config.php does not work any more
image

I have read this topic "Trusted_domains" login issue after the latest release update (no useful hint on 'error' web page) · Issue #40439 · owncloud/core · GitHub
And I also read Owncloud trusted_domain issue after upgraded from 10.10 to 10.11[SOLVED] — LowEndSpirit
And also Unable to trust the domain... inaccessible instance - Server - ownCloud Central

Everyone offered a solution to declare OWNCLOUD_TRUSTED_DOMAINS env variable instead of editing the php config file.

I am asking for help in order to try the offered solution.

Since I am a begginer I have no idea how to do it.
Which file I have to edit in order to declare my domain?
Is that the config.php?
or should i edit the overwrite.config.php? (I think it is not a good idea because every time you restart the vmare workstation you restart the container and all the changes in overwrite.config.php are deleted.

Maybe it is simple, but since I’m a begginer I need a more in-depth instructions of the exact commands I have to write in order to declare OWNCLOUD_TRUSTED_DOMAINS env variable.

For the pupose of this topic lets assume I own a domain ‘aaa.com

Hi,
I have a suspicion, could you please post the name of your network interface in the UCR variable (without IP address)? Use ucr get interfaces + Tab. Whats the name of the interface behind interfaces?

Regards

Maybe I don’t write the command correctly? Could you please guide me?
I am using PuTTy.
Login as root admin.
And then write the command:

image

Nothing happend

Did you press tab twice after ucr get interface/? There should be a network interface like eth0 or ens* or anything else. Alternatively you can get the interface name from a ip a.

Thanks. Indeed I miss twice tab
image

Hi,

I had a suspicion, but in your case it was not confirmed. When trying to reproduce the error, I noticed that the Docker compose file takes over the UCRV variable interfaces/DEVICENAME/address statically:

OWNCLOUD_TRUSTED_DOMAINS: "@%@hostname@%@.@%@domainname@%@,@%@interfaces/eth0/address@%@"

The DEVICE name may differ depending on the system. But it fits for you. I’ll see if I can find something else that might explain the behavior.

Hi,

I’m having the same problem after upgrading to UCS 5.0.5, but in my case, adding OWNCLOUD_TRUSTED_DOMAINS env variable doesn’t seem to work either.

I can say how you should add enviroment variables in Univention. You must connect to Univention Admin Portal,and go to System and Settings → System → Univention Configuration Registry. There you can ADD enviroment variables… BUT, in my case, this is not working. Although ucr get OWNCLOUD_TRUSTED_DOMAINS shows my desired config correctly, if I enter owncloud shell and ask for trusted_domains using occ config:system:get trusted_domains, it shows another thing.

I’ve ended up editing overwrite.config.php and comenting the code that overwrites original config.php trusted domains… the problem is that overwrite.config.php gets reset everytime you restart your Univention machine.

So… I would love to know what am I doing wrong setting up OWNCLOUD_TRUSTED_DOMAINS env variable.

Thanks a lot.

Another information that might help to understand the problem.

There is a temporary solution that “bring back to life” the possiblity to edit the ‘trusted_domains’ =>
in the config.php file.

Edit the file overwrite.config.php by deleting the line:
‘trusted_domains’ => $domain,
image

After that, editing config.php should work.
image

Indeed this work
image

Of course, This method is not a “normal” solution because it is only a temporary solution.
Immediately after rebooting vmare workstation and restarting the appliance any change in the file overwrite.config.php is removed automatically.

I added that information because maybe it can help us
to understand what changes we should make to the config.php file and not to the overwrite.config.php
Change the config.php remains permanent, however change the overwrite.config.php removed after reboot.

I added enviroment variables.
Doesn’t seem to work, exactly as you said.

After last upgrade, I also began receiving message about trusted domain. I regrettably am not an expert on docker etc. and cannot figure out from the above instructions and similar around the forum what exactly to do.
I get temporary relief editing "overwrite.config.php ", but it is not a permanent solution. Can anyone provide steps to fix this problem once and for all?
Thanks.

There is a disccussion about this issue un Owncloud-forum:

It shoud be claimed in Github.

Mastodon