Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The container doesn't support user chrooting #2

Closed
lpereir4 opened this issue Nov 12, 2014 · 9 comments
Closed

The container doesn't support user chrooting #2

lpereir4 opened this issue Nov 12, 2014 · 9 comments

Comments

@lpereir4
Copy link

The use of '-d /home/ftpusers/bob' (user chrooting) results in having this error when attempting to log in :
421 Home directory not available - aborting

If you do not intend to allow chrooting please update documentation (use of -D instead of -d)

@stilliard
Copy link
Owner

Hi @lpereir4,
Could you give me the steps/commands used to reproduce this error as i'm not currently see'ing it?

Also yes my demo command in the README if for a chrooted account to a specific folder, this is just a demo showing its usage, but i've now updated the doc's to say that this is a chrooted example.

@lpereir4
Copy link
Author

Hi @stilliard,

My host distribution is CentOS 7. I used the makefile and followed the README for user creation.

make build
make run
pure-pw useradd bob -u ftpuser -d /home/ftpusers/bob
pure-pw mkdb

Both command line ftp client and filezilla fails to connect :

220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 30 allowed.
220-Local time is now 17:49. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Name: bob
331 User bob OK. Password required
Password:
421 Home directory not available - aborting
ftp: Login failed

@stilliard
Copy link
Owner

Just double checking, the pure-pw commands, they have been run inside the docker container, not on the
host right?

@lpereir4
Copy link
Author

inside the docker container of course.

@stilliard
Copy link
Owner

Cool, just double checking as i've repeated the steps myself but i'm still
not see'ing this sorry.
Could you check inside the container that the "/home/ftpusers/bob" has been
created? It should automatically be created for you though.

@lpereir4
Copy link
Author

Indeed, the directory has been created.

@stilliard
Copy link
Owner

Strange, one other check, is the user ftpuser setup in the container, it should already be as its built from the dockerfile?

The only other thing i can suggest is to try pulling from the hub repo rather than building from here:

# on host to start, pull down and start the instance:
sudo docker pull stilliard/pure-ftpd
sudo docker run -i -t -p 21:21 stilliard/pure-ftpd

# now inside the container
pure-pw useradd bob -u ftpuser -d /home/ftpusers/bob
# enter a random password
pure-pw mkdb

# back on host
ftp -p localhost 21

I just followed the above process to double check and that worked for me.
Does this now work for you? Or do you still get the 421 error?

@lpereir4
Copy link
Author

Pulling from the hub works.
The new version of pure-ftpd is certainly the cause the issue.

@stilliard
Copy link
Owner

Closing as I believe this is now resolved.
Please re-open if this issue comes back, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants