Autoriser domaine

Bonjour a tous

J’utilise Nextcloud depuis quelques Années, par contre la j’ai du mettre une nouvelle installation avec Nextcloud 31.0.8 , je n’arrive pas à ajouter mon domain , le fichier config.php est en lecture seule, je n’arrive pas à modifier les droits non plus même en root, c’est bien pour la sécurité , mais comment autoriser mon domain? j’ai éssayé une ligne de commande type sudo occ config:system:get trusted_domains cela ne change rien du tout. Quelqu’un peut il m’aider? Merci par avance

Hey @Joebar0212 welcome to the Nextcloud community :waving_hand:

You posted your request in the support category. Unfortunately you ignored the template and a lot of information to help you is missing. Please edit your original post and add all required details like Nextcloud version, webserver type and version, os version, related log file content. Use the support template .

Without additional information the community members cannot help you.

However looking at the command you’ve tried sudo occ config:system:get trusted-domains you’ll not be able to `set` your trusted domains with that… prefer something like this;

sudo -u www-data occ config:system:set trusted_domains 0 --value="cloud.yourdomain.tld"

Note how you assign a separate ID number (iterating values 0, 1, 2…) for each trusted domain.

Set multiple trusted domains (iterating values 0, 1, 2…):

sudo -u www-data occ config:system:set trusted_domains 0 --value="cloud.yourdomain.tld"
sudo -u www-data occ config:system:set trusted_domains 1 --value="cloud.yourseconddomain.tld"
sudo -u www-data occ config:system:set trusted_domains 2 --value="cloud.yourotherdomain.tld"

Like this you would run this command as root. Normally you want to use the webserver user and rather fix the permissions of the files the occ script is supposed to change.

So for some debian/ubuntu/… this would be www-data. (to be used with the command like this sudo -u www-data ….).

1 Like