DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-06-24 17:41:04

petasis
Member
Registered: 2007-06-23
Posts: 39

chroot debian etch and sftp...

Hi all,

I have followed the instructions on the wiki and installed debian etch on my dns 323, in order to have ssh/sftp and subversion.I have created only one additional user in my dns. So far:

a) I am able to use subversion with my created user.
b) I am able to use ssh and login with my user & root.
c) I am able to use sftp but only as root. My regular user cannot login with sftp.

I think it is a debian issue, but as I don't know debian very well, I cannot solve it myself. I have looked at /etc/ssh/sshd_config (and added AllowUsers <my-user>) but I haven't managed to fix this. Any ideas?

Offline

 

#2 2007-06-25 20:24:15

kruzes
Member
Registered: 2007-05-31
Posts: 22

Re: chroot debian etch and sftp...

It most likely isn't a debian issue, it's a DNS-323 issue. The DNS comes by default with wrong permissions on devices such as /dev/null, and SFTP need to be able to write to /dev/null (I believe it is /dev/null that's the issue). You can verify this by running it in full debug mode.

If this is indeed your problem, the solution to this is to add write permissions for everyone to these devices. I've got something like this in my funplug:

Code:

chmod a+w /dev/tty
chmod a+w /dev/full
chmod a+w /dev/null
chmod a+w /dev/zero
chmod a+w /dev/random
chmod a+w /dev/urandom

Offline

 

#3 2007-12-18 23:10:33

ChrisOwens
Member
Registered: 2007-12-07
Posts: 31

Re: chroot debian etch and sftp...

kruzes wrote:

It most likely isn't a debian issue, it's a DNS-323 issue. The DNS comes by default with wrong permissions on devices such as /dev/null, and SFTP need to be able to write to /dev/null (I believe it is /dev/null that's the issue). You can verify this by running it in full debug mode.

If this is indeed your problem, the solution to this is to add write permissions for everyone to these devices. I've got something like this in my funplug:

Code:

chmod a+w /dev/tty
chmod a+w /dev/full
chmod a+w /dev/null
chmod a+w /dev/zero
chmod a+w /dev/random
chmod a+w /dev/urandom

I am trying out using the /dev directory that comes with the etch distribution rather than the one that comes with the dns323.  In other words, my fun_plug does not mount -bind /dev over the dev directory in the etch distribution.  This seems  to work OK, but I don't know if I'll break anything this way.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB