Jump to content
SlrG

ProFTPD Plugin for unRAID v6.7.0

613 posts in this topic Last Reply

Recommended Posts

well this is the gift that keeps on giving,

i used krusader to copy the mountscript to a share so i can access it from my pc and i used notepad++ to edit it, edited the rules for it and now it start the plugin but its unresponsive cant access the server via ftp even on a local network

Share this post


Link to post
Posted (edited)

@zonik

I will need the system logfile syslog then. Please upload it to a cloud storage and send me a private message with the link. Make sure it is not after a fresh start of your server, but after trying to login via ftp. Which client do you use to connect? What error message does it give when trying to connect?

Edited by SlrG
typo

Share this post


Link to post

i am using a browser and filezilla and both of them just time out, i am at work now but i will send you the log when i get home

Share this post


Link to post
Posted (edited)

@zonik

Installation and start of the plugin looks fine. You have anonymous users connecting, which does not work. Then there are users where no home directory is available. And lastly you have users where the password is not recognized.

 

How do you setup your users?

Did you add the keyword ftpuser in the comment field?

Optional: Did you give a working homepath to jail them into after this keyword separated by a space?

And did you restart the plugin after defining your users?

Some passwords with special chars may not work.

Start with simple ones and if it works increase the complexity.

 

Also a security notice:

It is not recommended to connect your unRAID servers services directly to the internet. It is better to use a VPN to connect to your home network and access the unencrypted ftp service from there. If you are set on making it public, make sure your external port is not 21, as that is the first to be hit by malicious crawlers. Research how to enable encryption when you get the baseline working. Some pointers are in this thread.

Edited by SlrG
password complexity hint

Share this post


Link to post

i can change the port to something more secure but i like to think to think i have made the user correctly unless i am missing something

ftpuser.PNG

Share this post


Link to post

The user definition looks fine. In your logs the user tester has problems to access his "home directory". Please check that /tmp/FTP really exists, when you try to login. Also make sure it hast the correct access rights. For that you can use the newperms command:

newperms /tmp/FTP

When testing on my server it works fine if I create a directory /tmp/FTP and jail an user into that. So in theory it should work for you too.

Share this post


Link to post

still keep getting errors at least its not a timeout this timebut it is this : Jul 10 23:21:27 Samwise proftpd[59560]: 127.0.0.1 (192.168.1.132[192.168.1.132]) - chroot to '~/' failed for user 'tester': No such file or directory
Jul 10 23:21:27 Samwise proftpd[59560]: 127.0.0.1 (192.168.1.132[192.168.1.132]) - error: unable to set DefaultRoot directory

Share this post


Link to post

@zonik

Well, this is not new. It was the same for the user tester in the logs you send me before. Please be sure to check out my tips one post above yours.

Share this post


Link to post

now there is something new going on, i can connect now and login but i only 1 folder in the media folder and that folder is empty i have tried to edit the mountscript file but nothing works, this is how i have it currently set:

 

#!/bin/bash
# put your commands for creating mount points and mounting here
# they will be executed when the array starts
# e.g.:
# mkdir /mnt/cache/FTP/movies;mount --bind /mnt/user0/movies /mnt/cache/FTP/movies

# Mounts just media for read only
# Directory Structure
!/bin/bash
mkdir /tmp/FTP/
mkdir /tmp/FTP/Media
mkdir /tmp/FTP/Media/anime;mount --bind /media/user/Media/Anime /tmp/FTP/Media/anime
mkdir /tmp/FTP/Media/movies;mount --bind /media/user/Media/Kvikmyndir /tmp/FTP/Media/movies

# Mounts for Apps/Tools/ISO ect
# Apps and Tools are Read only
# Uploads are Read/Write
!/bin/bash
mkdir /tmp/FTP/Uploads;mount --bind /mnt/user/Media/ftp/ /tmp/FTP/Uploads/

 

i should not that the anime folder is the only one visible and thats empty

Edited by zonik

Share this post


Link to post

@zonik

Well, there are IMHO some errors in your file. Only #!/bin/bash is correct, the second and third one without the hashtag should to be removed. Also you are trying to mount --bind from /media which should be /mnt instead.  Probably the folder anime gets created and then the execution of the mountfile stops because of the errors. Therefore nothing is mounted into the anime directory and it stays empty.

 

It should look like this:

#!/bin/bash
# put your commands for creating mount points and mounting here
# they will be executed when the array starts
# e.g.:
# mkdir /mnt/cache/FTP/movies;mount --bind /mnt/user0/movies /mnt/cache/FTP/movies

# Mounts just media for read only
# Directory Structure
mkdir /tmp/FTP/
mkdir /tmp/FTP/Media
mkdir /tmp/FTP/Media/anime;mount --bind /mnt/user/Media/Anime /tmp/FTP/Media/anime
mkdir /tmp/FTP/Media/movies;mount --bind /mnt/user/Media/Kvikmyndir /tmp/FTP/Media/movies

# Mounts for Apps/Tools/ISO ect
# Apps and Tools are Read only
# Uploads are Read/Write
mkdir /tmp/FTP/Uploads;mount --bind /mnt/user/Media/ftp/ /tmp/FTP/Uploads/

 

Edited by SlrG
typo

Share this post


Link to post

Excellent plugin. 

I have it up and running but was hoping there was a way to have it running as an SFTP? I'm not entirely well versed in the process, and I admit I haven't read this entire thread (it dates back 6 years!?!?) Any help on getting it to run SFTP and/or at least on how to change the port, would be appreciated.

Thanks

 

Share this post


Link to post

I know I will sound disrespectful, so please forgive me, but I'm a bit burned out by answering the same questions over and over. The info you are requesting is one page back or at least a link to it. Also the topic is searchable and using the keyword SFTP would have given you the needed results. 

 

Here is a direct link to the post.

On how to change the port: You could do this in the proftpd.conf file, but I recommend staying on the default port for the server and setting up a port forwarding rule in your router which will forward an external port of your choice to the internal default port.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.