571926 CHRooted SFTP Server with Security

Completado Publicado Jun 21, 2012 Pagado a la entrega
Completado Pagado a la entrega

We have a project that requires a unique server configuration that I can't seem to work out. I am posting a contest for whoever solves the issue. My issue is that I can't work out the permissions to allow users read/write (and Delete) AND have them sent to their home dir on login (a requirement). I have a Debian server running OpenSSH set up with a chroot set to be /home/ but this is causing an issue since this is not satisfying one of the requirements.

The application I am setting up for requires that it's dropped into it's home dir (Example:/home/shop123) with read and WRITE abilities. If the user is simply dropped into /home/ (the current chroot) it causes and error.

However, with a Chroot (Debian- OpenSSH), the root has to have ownership and group rights and no user can have WRITE ability. Otherwise you get this:

sshd[19490]: fatal: bad ownership or modes for chroot directory component

See: [url removed, login to view]

Thus you have to set the Root as /home/ and then put the users dir in there with the users Dir having read/write permissions (6).

On login however, the system is shifting them to /home/

If I could just put in some kind of deal where it pushed them immediately into the home dir before sending back the list, it would all work...Otherwise the application is confused.

It's set as their default dir...Not sure what else to do.

Users created using ($1 being user name, $3=User ID):

useradd $1 -d /home/$1 -m -g 1000 -o -b /home/$1 -u $3 -s /bin/false

chown $1 /home/$1

chmod 700 /home/$1

FYI, I am married to no OS and could flip to another OS quickly if someone has an idea...

This project will include "solving" this basic issue of getting the user into their dir and also advising on setting up basic security parameters on this server with everything else closed. The "test" is that the application is given credentials and the application logs in successfully. Whoever sends me the solution first wins.

Odd Jobs Seguridad web

Nº del proyecto: #2317897

Sobre el proyecto

1 propuesta Proyecto remoto Activo Jul 11, 2012

Adjudicado a:

garhwalsatyapal

Contest entry #1 on project ID 1340284835

$20 USD en 0 días
(16 comentarios)
3.6