Tiny Core Base > Raspberry Pi

piCore 14.x sftp not working after update from 13.x?

<< < (3/5) > >>

Cheembus:

--- Quote from: Cheembus on April 02, 2024, 04:11:49 PM ---
www-data:x:1003:1003:Linux User,,,:/home/www-data:/bin/false is the output of that command.

I'll try the syslog in a bit and report back in a few minutes.

--- End quote ---


--- Code: ---Apr  2 20:20:32 box auth.info sshd[3779]: Accepted password for www-data from X.X.X.X port 55238 ssh2
Apr  2 20:20:32 box auth.crit sshd[3781]: fatal: bad ownership or modes for chroot directory component "/"

--- End code ---

hmmmmm....


right now, /mnt/www is owned by www-data:www-data and perms are drwxr-xr-x

patrikg:

--- Quote ---ChrootDirectory settings? do I need to specify something else in my sshd config? Maybe I actually have to specify this as my new home directory in the passwd file, for this new version of sftp?

--- End quote ---

Can you see with sudo sshd -T that your settings take effect.

Cheembus:
chrootdirectory none is the only reference to the chrootdirectory, only I would assume this is for global users, and I wouldn't think it would show up for Matching Users.

Rich:
Hi Cheembus
Read this:
https://takahisa.info/2010/03/18/sftp-chroot-with-openssh-error-fatal-bad-ownership-or-modes-for-chroot-directory/

My guess is  /mnt  has extra write permissions.

Cheembus:
I decided to simplify my configuration and just created a temporary /dump directory located at / with ownership root:root and 700 permissions.
I set my sshd config to contain as such:


--- Code: ---Match User www-data
        ChrootDirectory /dump
        ForceCommand internal-sftp
        PasswordAuthentication yes
        AllowTcpForwarding no
        X11Forwarding no
        ClientAliveInterval 60


--- End code ---


It follows the requirements of the link you posted, but still refuses to connect, for the same "fatal: bad ownership or modes for chroot directory component "/" " error.

Seems no matter what I do, it will always refuse any non-home directory as chroot.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version