M
M
MaksSmag2020-07-19 19:27:37
SSH
MaksSmag, 2020-07-19 19:27:37

Why SFTP server won't let me connect?

Please help me figure it out. I installed an SFTP server on Debian on port 33021 , allocated the /var/www directory for the warrior91 user , when trying to disconnect via WinSCP, the client resets the connection : it prevents everyone in the sftp-site group from entering): 2. Latest logs:
5f1471b93ac5a516115736.png

5f14720d3edd4314582623.png

auth.log
Jul 19 23:18:31 pc-server sshd[1160]: Accepted password for warrior91 from 192.168.31.1 port 60535 ssh2
Jul 19 23:18:31 pc-server sshd[1160]: pam_unix(sshd:session): session opened for user warrior91 by (uid=0)
Jul 19 23:18:31 pc-server systemd-logind[440]: New session 32 of user warrior91.
Jul 19 23:18:32 pc-server systemd: pam_unix(systemd-user:session): session opened for user warrior91 by (uid=0)
Jul 19 23:18:32 pc-server sshd[1173]: fatal: bad ownership or modes for chroot directory "/var/www"
Jul 19 23:18:32 pc-server sshd[1160]: pam_unix(sshd:session): session closed for user warrior91
Jul 19 23:18:32 pc-server systemd-logind[440]: Session 32 logged out. Waiting for processes to exit.
Jul 19 23:18:32 pc-server systemd-logind[440]: Removed session 32.
Jul 19 23:18:35 pc-server sudo:  makssmg : TTY=tty1 ; PWD=/var/log ; USER=root ; COMMAND=/usr/bin/nano auth.log
Jul 19 23:18:35 pc-server sudo: pam_unix(sudo:session): session opened for user root by makssmg(uid=0)

What's wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
paran0id, 2020-07-19
@MaksSmag

fatal: bad ownership or modes for chroot directory "/var/www"

well, here it is: the wrong owner or the rights of the directory where the hell is being done

V
Viktor Taran, 2020-07-20
@shambler81

in the current system of rights, you all know 744 644 and so on
what this means, you probably know too
But what switches the user between each of these groups.
So this is the owner chmod -
determines the rights for each of the groups, for example 700 600 006, etc. group. Therefore, this is option 3, that is, you get into non-authorized users. what do you think what access will sftp give to a user who logged in on the server, but according to the security policy, he did not get into the owner or into the group, but in fact got into the others.
Actually, he let you into the server, but didn't find anything to give you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question