Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My scanner apparently can't save files on the FTP server running on my Raspberry Pi: The server answer, however, seems to consist only of its IP address (printed out when scanning is unsuccessful.
To configure the server, I mostly followed this tutorial(although the server OS is Raspbian 12), except I haven't secured it with SSL, with everything being on my home LAN - and the scanner's FTP client might not support it.
The report printed out is:
Quote:
Scanniong to FTP server failed.
Date:
Connection error: -4
File put command failed
server answer: 192.168.178.4
Here's my vsftpd.conf (I deleted all commented-out lines):
I actually felt that it might be a more robust solution with a Linux server. Also, when I have to use Micrsoft tech, I feel like I'm getting my hands dirty.
Quote:
Can your scanner use SMB shares? Surely, that would be a better option.
Apparently, it can. How is it better in your opinion? I already have the FTP server all set up (with some config error still to fix, apparently), and would have to go through the whole procedure again setting up SMB. Is the hypothetical advantage worth it?
For the record, scan-to-FTP has already worked with this same scanner/MFP, but I had to reinstall the Raspberry Pi's OS and also changed the router (new ISP).
Already did (except it's 192.168.178.4:21 rather than 192.168.178.1:21), no difference
Quote:
Can you log into the server from another machine?
Yes, currently I only have SSH running to interact with the server, but could work on it directly/physically and install a GUI, if need be (I hope not).
Quote:
Probably chroot. Users shouldn't be able to acess full path from chroot jail.
To be honest, I haven't quite understood the chroot jail thingy (and all about locking a user out from a folder that it's supposed to save files to??). Which setting do I need to fix for that path issue?
The question I believe was can you log into the server from another machine using ftp. A chroot jail keeps the user confined to the desired directory. Since the desired directory is /home/$USER/ftp any attempt to use cd to change to a higher directory i.e. /home/$USER/ should cause an error.
Chroot changes user's root folder to something else, so full path starting from /home/... becomes inaccessible. You can either disable chroot but this will bake your system less secure, or you can figure out where vsftpd chroots its users and specify the path on the scanner accordingly. If it is user's home, as most probably is the case, then it should be /FTP/Scans/...
$ ftp -p 192.168.178.4
Connected to 192.168.178.4 (192.168.178.4).
220 (vsFTPd 3.0.3)
Name (192.168.178.4:ben): xeroxb225
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd ..
250 Directory successfully changed.
ftp> dir
227 Entering Passive Mode (192,168,178,4,171,42).
150 Here comes the directory listing.
drwxr-xr-x 2 1002 1002 4096 Dec 10 01:25 Scans
-rw-r--r-- 1 0 0 17 Dec 09 23:44 test.txt
226 Directory send OK.
ftp> cd /home/xeroxb225
550 Failed to change directory.
Btw in the default config it used Extended Passive Mode rather than Passive mode - I changed that by entering the `passive`command, and now I can't find a way to go back. Could Passive Mode be causing problems?
Looking at the vsftpd.conf file, can you see anything wrong?
Quote:
you can figure out where vsftpd chroots its users and specify the path on the scanner accordingly. If it is user's home, as most probably is the case, then it should be /FTP/Scans/...
I'm guessing these lines in vsftpd.conf are doing what you mean:
I actually felt that it might be a more robust solution with a Linux server. Also, when I have to use Micrsoft tech, I feel like I'm getting my hands dirty.
I don't think FTP is more robust than a direct connection. Samba isn't Microsoft software.
Quote:
Originally Posted by bennypr0fane
Apparently, it can. How is it better in your opinion?
Easier to use, wider compatibility, better security, etc. FTP is a dying protocol.
Quote:
Originally Posted by bennypr0fane
I already have the FTP server all set up (with some config error still to fix, apparently), and would have to go through the whole procedure again setting up SMB. Is the hypothetical advantage worth it?
You do whatever you like... but there are better ways.
In a chroot environment the "root" directory is /home/xeroxb225/FTP which is seen as /. The filename to specify in the printer would be I would guess:
file name: /Scans/scannedimage
From reviewing the online manual all it says is configure the settings which does not help much if I am looking at the correct document.
Check the logs /var/log/vsftpd.log
Also according to the online manual the printer supports sftp by specifying the port numbers as 22. You can also configure a ssh user with a chroot jail or sftp only privileges.
samba isn't Microsoft software, just the implementation of Microsoft software...
It works with the file name /Scans/scannedimage! And in one of the scan profiles (one for .pdf, one for .jpeg), I had it configured completely wrong, which found out looking into the logs.
I already had port 21 specified in settings.
Thanks for all the helpful hints!
Btw I also set up and SMB share, just to see how it's cooler and everything - and it's not working (and the logs have me stumped as well)... Maybe I'll make a separate post about it, if somehow I find out it actually is better for my purposes.
The client software on the printer might only support SMB version 1 which is now depreciated so it may not work at all. Did you add a samba password if required using the smbpasswd command?
I confirmed that the client supports SMB up to v3.
Yes, I used the smbpassword command, but it's still not working. I created a new thread for this problem here.
Thanks for all the help!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.