Help getting pureftpd working

Please post questions about ReadyNAS add-ons here.

Help getting pureftpd working

Postby Dewdman42 » Sat May 19, 2012 11:02 pm

I have recently purchased and installed Who Care's pureftpd addon. I went into the virtual user manager and created a virtual user, assigned it to one of the NAS uid's, which I guess influences what the owner of uploaded files will be. I chrooted the virtual user into a folder, etc. and saved.

When I try to connect to the ftp server with an ftp client, the banner comes up, but after the password I get:

Code: Select all
Response:   530 Sorry, but I can't trust you
Error:   Critical error
Error:   Could not connect to server


I've tried to redo the password a dozen times, cannot figure out why it won't login. Does anyone have any idea what I might be missing?
Dewdman42
Advanced ReadyNAS User
 
Posts: 137
Joined: Sun May 06, 2012 10:13 pm

Re: Help getting pureftpd working

Postby Dewdman42 » Mon May 21, 2012 11:37 am

(bump)
Dewdman42
Advanced ReadyNAS User
 
Posts: 137
Joined: Sun May 06, 2012 10:13 pm

Re: Help getting pureftpd working

Postby WhoCares? » Mon May 21, 2012 11:56 am

You're trying to connect with a user ID that's not in the trusted range.

-Stefan
Follow me on Twitter or visit my web site
If you like my add-ons (Image downloads so far), please consider a --> donation. and get your entry in the "Hall of Fame".
(Current download to donation ratio: 0,19% [405:1])
User avatar
WhoCares?
ReadyNAS Add-ons Expert
 
Posts: 2919
Joined: Tue Jan 15, 2008 6:34 am
Location: At my desk ;)
ReadyNAS: Pro

Re: Help getting pureftpd working

Postby Dewdman42 » Mon May 21, 2012 11:58 am

trusted range is uid over 1000?
Dewdman42
Advanced ReadyNAS User
 
Posts: 137
Joined: Sun May 06, 2012 10:13 pm

Re: Help getting pureftpd working

Postby Dewdman42 » Mon May 21, 2012 11:59 am

but I guess I don't understand because I was trying to use a virtual user. So you're saying that each of my virtual users needs to have an effective uid assigned to it that is over 1000?
Dewdman42
Advanced ReadyNAS User
 
Posts: 137
Joined: Sun May 06, 2012 10:13 pm

Re: Help getting pureftpd working

Postby WhoCares? » Mon May 21, 2012 12:08 pm

Correct. Every other user account would be a system account like root, ftp or whatever else and thus they're not allowed to be used for FTP access by default. Of course you could always change the PureFTPd config.

-Stefan
Follow me on Twitter or visit my web site
If you like my add-ons (Image downloads so far), please consider a --> donation. and get your entry in the "Hall of Fame".
(Current download to donation ratio: 0,19% [405:1])
User avatar
WhoCares?
ReadyNAS Add-ons Expert
 
Posts: 2919
Joined: Tue Jan 15, 2008 6:34 am
Location: At my desk ;)
ReadyNAS: Pro

Re: Help getting pureftpd working

Postby Dewdman42 » Mon May 21, 2012 12:10 pm

I've been reading up on pureftpd, but its a complex beast. I see it has a lot of power, but I don't really want to get too complicated, just want a couple of virtual users that I can chroot into their own folder. I'm fine if they all share the same underlying UID/GID for files they might upload or files they are allowed to read, etc.

I think I tried setting the UID to nobody, which is way over 1000, still didnt' work, but I will try creating a dedicated proxy UID just for pureftpd use, with gid over 1000 and see what happens.
Dewdman42
Advanced ReadyNAS User
 
Posts: 137
Joined: Sun May 06, 2012 10:13 pm

Re: Help getting pureftpd working

Postby WhoCares? » Mon May 21, 2012 12:15 pm

Yes, for that scenario using a dedicated account would be the best solution I'd say.

-Stefan
Follow me on Twitter or visit my web site
If you like my add-ons (Image downloads so far), please consider a --> donation. and get your entry in the "Hall of Fame".
(Current download to donation ratio: 0,19% [405:1])
User avatar
WhoCares?
ReadyNAS Add-ons Expert
 
Posts: 2919
Joined: Tue Jan 15, 2008 6:34 am
Location: At my desk ;)
ReadyNAS: Pro

Re: Help getting pureftpd working

Postby Dewdman42 » Mon May 21, 2012 12:58 pm

That did it. thanks!

Now I have to figure out what to do about the fact that OSX likes to create the main user with UID 501 for some reason, so all kinds of files are permissioned that way, etc... which means its not easy for me to use NFS between OSX and ReadyNAS due to the fact that my ReadyNAS uid needs to be over 1000. (sigh)
Dewdman42
Advanced ReadyNAS User
 
Posts: 137
Joined: Sun May 06, 2012 10:13 pm

Re: Help getting pureftpd working

Postby WhoCares? » Mon May 21, 2012 1:11 pm

Interestingly I never felt the need to use NFS on my Macs to connect to the ReadyNAS. Any special application you want/need to use NFS for? As for the ID issue: I found some things Apple did to the Mac OS to be rather inconvenient, especially when it comes to stuff like automounting and the like. As for your problem: did't actually try it but the NFS server on the ReadyNAS should be able to support UID/GID mappings. They would most likely need to be configured on the command line but should solve your problem quite nicely.

-Stefan
Follow me on Twitter or visit my web site
If you like my add-ons (Image downloads so far), please consider a --> donation. and get your entry in the "Hall of Fame".
(Current download to donation ratio: 0,19% [405:1])
User avatar
WhoCares?
ReadyNAS Add-ons Expert
 
Posts: 2919
Joined: Tue Jan 15, 2008 6:34 am
Location: At my desk ;)
ReadyNAS: Pro

Re: Help getting pureftpd working

Postby Dewdman42 » Mon May 21, 2012 1:26 pm

I'm learning a lot from you!

I didn't even know it was possible to do that with NFS, but I will look into that, as I'd rather not mess with the default UID on OSX.

I'm not sure whether I want or need to use NFS or not. I initially thought it might be faster than AFP and SMB. Today I posted a benchmark on the performance forum that I did last night. NFS out performed AFP and SMB for most things, but badly under performed for 4k block reads and writes. I know NFS might be tunable for this. Or maybe AFP is fine.

I agree OSX's automount stuff is jacked up. I recently tried to do an automount using the /net feature, but now for the life of me I can't figure out how to get rid of it.
Dewdman42
Advanced ReadyNAS User
 
Posts: 137
Joined: Sun May 06, 2012 10:13 pm

Re: Help getting pureftpd working

Postby WhoCares? » Mon May 21, 2012 1:36 pm

As it seems the ReadyNAS doesn't support per share mappings using a map_static directive in the exports file. But it should at least allow for setting the anonuid and anongid parameters which together with an all_squash directive should do the trick of rerouting your Mac user ID to the correct one on the ReadyNAS. The major drawback here is that you'd then have to make sure that only your Mac is allowed to access sensible shares and even then all users on the Mac would gain access to your user's shares on the ReadyNAS. NFS just isn't perfect ;)

-Stefan
Follow me on Twitter or visit my web site
If you like my add-ons (Image downloads so far), please consider a --> donation. and get your entry in the "Hall of Fame".
(Current download to donation ratio: 0,19% [405:1])
User avatar
WhoCares?
ReadyNAS Add-ons Expert
 
Posts: 2919
Joined: Tue Jan 15, 2008 6:34 am
Location: At my desk ;)
ReadyNAS: Pro

Re: Help getting pureftpd working

Postby Dewdman42 » Mon May 21, 2012 1:45 pm

I guess NFS works great in an all unix environment with multiple machines sharing the same directory server. In that situation, its quite transparent. For those of us with simple home setups, no directory server, etc... well...maybe NFS is just too much to deal with. I'm probably just gonna stick with AFP and SMB for now, even though they have some over head and take longer to display folder contents.

A few months ago I was trying to connect my mac with my Media box (Popcorn Hour or Net Media Tank). That box definitely works better with NFS then SMB on the mac, I can't remember why now. I actually went back from Lion to Snow Leopard because NFS was broken on Lion in some way, I can't remember the details now.

In any case, it let me to believe that NFS would be better to use between UNIX environments, including OSX. But as these issues come to the surface I'm increasingly inclined to just use AFP and keep it simple.
Dewdman42
Advanced ReadyNAS User
 
Posts: 137
Joined: Sun May 06, 2012 10:13 pm


Return to General Discussion on ReadyNAS Add-ons



Who is online

Users browsing this forum: F.L. and 3 guests