Root Rechte + WinSCP + und NC von Daniel Hansson

Then the best option would be to work with SSH keys, if I recall correctly WinSCP supports that.

Opening up root with password only is a bit dangerous if you ask me.

Just my 2 cents. :slight_smile:

Sure. We covered that. :wink:

1 Like

Hello Daniel, thanks for your answer.
DH -> I don’t think it’s a good idea to add a root user in Ubuntu since you always use sudo -i or plain sudo [cmd] to run as root.

I -> you are right. I have understood. I will not add a root user. I will take sudo -i as you recommend.

When I take sudo -i the following happens:

ncadmin@nextcloud:~$ sudo -i
[sudo] password for ncadmin:
Fetching all the variables from lib.sh...
Testing if network is OK...
Checking connection...
Online!
Testing if network is OK...
Checking connection...
Online!
Setting locales...
Generating locales (this might take a while)...
  de_DE.UTF-8... done
Generation complete.
Generating locales (this might take a while)...
  de_DE.ISO-8859-1... done
  de_DE.UTF-8... done
  de_DE.ISO-8859-15@euro... done
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IL.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.

Is that correct, do I have to worry? :wink:

I am now using the Midnight Commander, I can handle it. I also have a connection to my NFS share. I can use it to copy files.

That means that the first setup failed, or didn’t end properly. The last thing that happens in the setup is that the setup script is removed. In case it’s not removed you will end up in a situation like you are experience now - as soon as you become root in Ubuntu, the setup script will start.

I always recommend to re-run the whole setup again, meaning removing the VM, mount it again and start over - since it’s impossible to know afterwards exactly which lines that didn’t run.

Hope it helps!

Hi Daniel,

I assumed the setup is OK. I would never have thought of that. I ran the setup as ncadmin. Thank you! The start script is still there. I will recreate the VM. The moment is favorable because I wanted to buy a smaller VM :wink:

Thank you so much!

Hallo Zusammen,

der Abschlussbericht.

Daniel Hanson hatte Recht, mein erstes Setup war aus unbekannten Gründen defekt. Das war die Ursache dafür, dass wenn ich den Benutzer wechseln wollte erneut das Start Skript startete. Ich habe die komplette NC-VM von Daniel Hanson neu aufgesetzt und der Fehler war damit behoben.

Obwohl ich Jahrelang als root unterwegs gewesen bin, weil es bequemer war, habe ich mich jetzt dazu entschlossen das nicht mehr zu tun, sollte ich erweiterte Rechte benötigen, dann verwende ich sudo -i

Sollte ich unterhalb von /var/www/nextcloud Anpassungen in einer Konfigurationsdatei vornehmen müssen, dann führe ich danach chown -R www-data:www-data /var/www/nextcloud aus um die Rechte wieder an www-data zu übergeben.

Statt WinSCP verwende ich jetzt MC, das erfüllt meine Anforderungen um an der ein oder anderen Stelle Wartungsarbeiten und Anpassungen in Konfigurationsdateien vornehmen zu können.

Geschlossen – Vielen Dank an alle Beteiligten und besonderen Dank an DH das er sich hier eingeschaltet hat. Ich wäre nie darauf gekommen, dass das erste Setup defekt gewesen ist.

1 Like

wenn du mal tiefer eintauchen möchtest.

vielleicht gleich:

sudo -u www-data vi /var/www/nextcloud/config/config.php

1 Like

Glad you solved it! :smiley: