[Debian 10 / Nextcloud] probably an easy problem...

Operations

n00b
Joined
Mar 11, 2019
Messages
45
I am way more a Windows (server) kinda guy but i would like to get this working, also to work on my linux skills. I know Ubuntu is easier, but i would like to learn Debian. I am trying to install Nextcloud on Debian. I already have a nextcloud installation running on Ubuntu.

I am trying to install Nextcloud on Debian 10.4.
I am using this HowTo:

https://riegers.in/nextcloud-installation-guide-debian/

My first problem was that:
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -

Didn’t work. So i removed “sudo” to solve that problem. Since i already used the sudo command in the beginning i figured that was probably the problem.

Now my problem is that:
Service nginx restart is not working.
Error: service: command not found

Could someone tell me how to fix this?

And question two: why isn’t this HowTo 100% working;)
 
Try...

/etc/init.d/nginx start


I can't remember if this world's in Debian or not.

Edit: replace start with restart or stop or status.

Edit2: you need to be root to do this. So use Sudo.
 
I have solved the problem, solution was to use this command: systemctl restart nginx

But got a new problem now:

sed -i “s/09,39.*/# &/” /etc/cron.d/php
(crontab -l ; echo “09,39 * * * * /usr/lib/php/sessionclean 2>&1”) | crontab -u root -

gives “no crontab for root”. Someone or auntjemima know how to solve this?
 
I have solved the problem, solution was to use this command: systemctl restart nginx

But got a new problem now:

sed -i “s/09,39.*/# &/” /etc/cron.d/php
(crontab -l ; echo “09,39 * * * * /usr/lib/php/sessionclean 2>&1”) | crontab -u root -

gives “no crontab for root”. Someone or auntjemima know how to solve this?
Are you root when issuing this command? If you're not root and try to access cron that belongs to root, the system won't see that and think there is no crontab for root.
 
Are you root when issuing this command? If you're not root and try to access cron that belongs to root, the system won't see that and think there is no crontab for root.

B00nie
I use putty to connect to the machine, i login as user and type sudo (and enter password). Is that not the same as root?

I do this because i am not able to login as root (using Putty). The error is Acces denied.
When i look at the site:

https://linuxconfig.org/enable-ssh-root-login-on-debian-linux-server

It is not the same as what i see looking at that file.
I see
PermitRootLogin prohibit-password so i don't think that this is the reason why i cannot login as root.
 
Running as root is bad practice but I find sometimes when chaining or piping commands together it's easier to run as root by using "sudo su" and the pasting the command. Make sure you've tested the script as regular user first and made any necessary changes for root user before pasting.
 
B00nie
I use putty to connect to the machine, i login as user and type sudo (and enter password). Is that not the same as root?

I do this because i am not able to login as root (using Putty). The error is Acces denied.
When i look at the site:

https://linuxconfig.org/enable-ssh-root-login-on-debian-linux-server

It is not the same as what i see looking at that file.
I see
PermitRootLogin prohibit-password so i don't think that this is the reason why i cannot login as root.
You don't have to login as root, you can elevate your session with sudo or switch to root by sudo su.
Huh, gives me shivers to think you're using Windows and PuTTy lol. I wouldn't dream to use Windows for a daily driver.
 
Using SSH you're simply 'logging in'.

If you want to do anything as root you need to either prefix the command with 'sudo' or enter 'sudo su' to become root. Once you enter 'sudo su' you will see the terminal prompt change from a '$' to a '#'. This indicates you are now root.
 
Back
Top