root and ssh

Asked by Meffy

Hello again!
On my former installation (Ubuntu) I somehow got BiT to work in root-mode in order to use it with anacron. Somehow the system got messed up (yes, too much playing around...) and so I installed Debian on my machine. The version delivered with 8.2 was quite old (without the additional rsync commands), so I installed BiT 1.1.6.
Anyway, I'm quite confused. So, keys for user (meffy) and root are generated and copied to the server. Login via ssh works quite good for both users. But when configuring BiT I get the message (user: meffy):
"Can't write to: /root/.local/share/backintime/mnt/tmp_1_2855/backintime/localhost/root/1. Are you sure you have write access?".
Well, no, I don't have because sshfs (I guess) mounts to /root/..., but I am connected as user "meffy", so I don't have write permission to this folder. There are some folders in /root/.local/share/backintime/... with permission 777, so creating a file with touch shows me the owner is meffy.
So, did I miss a thing or do I just not understand what I am doing...?
Thanks a lot!!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu backintime Edit question
Assignee:
No assignee Edit question
Solved by:
Meffy
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Did you enable root SSH (not advised)

Revision history for this message
Meffy (dameffy) said :
#2

As a complete newbie: could you be more specific?
On server side I didn't change a thing (at least not intentional) since the last working configuration (except an automatic update on the Synology NAS changed something...).
Just for clarification: as root, I connect the server as user meffy and not as root. So who is actually connecting with which permissions?
And is there a severe difference between Ubuntu and Debian concerning root and BiT?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

what is the output of:

grep -i root /etc/ssh/sshd_config

On the server side.

Thanks

Revision history for this message
Meffy (dameffy) said :
#4

Hi!
The output is

#PermitRootLogin yes
# the setting of "PermitRootLogin without-password".
ChrootDirectory none
Match User root

I'm a little confused about "PermitRootLogin yes". As I said I did not intentionally change the settings on server side, so this is the default setting. When there was no update on server side the was changing this setting I am quite sure that BiT worked with Ubuntu (I had a look on backups made under Ubuntu, there all the files had the permissions root/root, even the home directory. Not directly that what I wanted, but anyway...). Mabye (when having some time...) I will install a VM with Ubuntu and see if it still works there...

Thanks!

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

That is a comment. The root login via SSH is blocked by default for many security reasons. You can override this by uncommenting this line but it is wiser to permit your user account write access to where you want to upload data to.

Revision history for this message
Meffy (dameffy) said :
#6

Thanks, I guessed that was a comment ;-). And I'm quite sure this was never allowed because I never edited this file...and I don't think it is the intention of BiT tp provoke a security leak. So again I'm stuck. On my wife's former machine setup with Ubuntu the backups were controlled by anacron and we did not fiddle around with creating an anacron group or whatever, the setup was just made in root mode. It worked there (unfortunately she switched to Debian as well, so we can't restore the settings...).
sshfs mount the server's filesystem to the host's /root directory where I as user do not have any access rights. Obviously I could change this, but I'm not quite sure if I really do want that. So how is this solved in Ubuntu? Where is the filesystem mounted to in root mode? Where is the difference?

Revision history for this message
Meffy (dameffy) said :
#7

Ok, sorry for this whole mess...
I tried it under Ubuntu, and there I do have the same behaviour (actually I'm not quite surprised :-)).
Thanks a lot for your time; I guess I just missed a small piece and will play around a little bit more...