Ok, I need to setup an internal ftp at work, in order to share some files. I have tried using pure-ftpd and vsftpd but I was unable to get it to work.
With vsftpd, I get it up first by going in yast and setting it up there, starting xinetd and of course, editing the default config file at /etc/vsftpd.conf. I want everyone to be able to type in ftp://86.55.181.116 and be able to see the files and write to that folder. They are using Win 7, I am on suse 12.3. Whenever they try to access the server, it prompts for login, and even if they check anonymous or not, the prompt appears again and again without letting them login.
For pure-ftpd, this did not work at all. I can not even start it. Tried editing the conf and running /usr/sbin/pure-config.pl /etc/pure-ftpd/pure-ftpd.conf but the console simply froze.
I now managed to get pure-ftpd up and running. Apparently after a reboot, running the start command again, the konsole still freezes, but closing the console and then trying to access the ftp works. The user’s can see the files. However in the /etc/pure-ftpd/pure-ftpd.conf I gave anonymous write permissions, but they cannot create new folder or paste files. Any ideas?
Append a ‘&’ to your command line, then the konsole shouldn’t freeze. Or press Alt+F2 and run it there…
The user’s can see the files. However in the /etc/pure-ftpd/pure-ftpd.conf I gave anonymous write permissions, but they cannot create new folder or paste files. Any ideas?
Does the parent folder (where your ftp share is located) have write permissions for the user pure-ftpd runs as?
Try to grant write permissions for all users on that folder.
And when someone tries to access the ftp it says “An error occurred opening that folder on the FTP Server. Make sure you have permission to access that folder. Details: The operation timed out”
I am now going to be a complete n00b, but what do you mean by user vftp runs as? If you are asking if my login user has access to the folder, the answer is yes I can read and write to it.
Apparently it already gets started during boot.
Could you please show the output of:
systemctl status pure-ftpd.service
That service calls “/usr/sbin/pure-config.pl /etc/pure-ftpd/pure-ftpd.conf” so it should just work for you (as you call just the same to start it).
You can start/stop it with “sudo systemctl start pure-ftpd.service” or “sudo systemctl stop pure-ftpd.service”.
You can enable/disable the automatic start at boot with “sudo systemctl enable pure-ftpd.service” or “sudo disable pure-ftpd.service”
I am now going to be a complete n00b, but what do you mean by user vftp runs as? If you are asking if my login user has access to the folder, the answer is yes I can read and write to it.
If pureftp is started as system service it runs as a different user, not you.
Also the ftp users that want to connect have to have access to that folder, not only you.
So check that the permissions are set to rwxrwxrwx for now, then everybody should have access.
As I don’t have any experience with pure-ftpd myself, I can’t tell you which directory pure-ftpd uses by default for anonymous access, sorry. (and there’s nothing about that in the config you posted).
for some whatever reason after a second reboot, the service did not start automatically. I was able to start it manually and again the users can access the files. The folder path is not in the config file for some reason. I was only able to set that with yast and i have no ideea where yast-ftp keeps it’s config file. Where do i set the rwx permissions?
According to the pure-ftpd documentation, you have to have a user “ftp” on your system for anonymous access.
The anonymous dir is then the home directory of that user (on openSUSE this normally is /srv/ftp/).
So please check if the user “ftp” does exist:
grep ftp /etc/passwd
This should also show its home directory as second field starting from the end.
This is what I got. As for the home directory, I am not certain what to make of this. Also, from what I understand, pure-ftpd, can use the same folder for both read and write permissions. The way I had this setup rpeviously, was like, users accessed ftp://ipaddress and the folder for that was D:\lab. Users could read and write to that. This is what I am trying to achieve here.
I should probably mention that the path that shows up there the “/windows/D/Lab” is a NTFS partition. I’ve tried changing the permissions for that folder, however it doesn’t appear to work, nor from the console or from konqueror.
Also, thank you for your help. It is greatly appreciated.
I have just tried
beliskner:/home/thor # sudo systemctl stop pure-ftpd.service
beliskner:/home/thor # sudo systemctl start pure-ftpd.service
beliskner:/home/thor # sudo systemctl stop pure-ftpd.service
beliskner:/home/thor # sudo systemctl start pure-ftpd.service
beliskner:/home/thor #
I modified something in the config file and wanted it to take effect. However, from what I can see they don’t work. If i stop it, everyone can still access it, if i start it, nothing changes.
Is it possible it is not set to start as a system service? And if yes, how do I set it as a system service?
]Edit:
Sorry, I just noticed you asked for this previously.
beliskner:/home/thor # systemctl status pure-ftpd.service
pure-ftpd.service - Pure-FTPd FTP server
Loaded: loaded (/usr/lib/systemd/system/pure-ftpd.service; disabled)
Active: inactive (dead)
CGroup: name=systemd:/system/pure-ftpd.service
Jun 21 17:50:15 beliskner.site systemd[1]: Stopped Pure-FTPd FTP server.
Jun 21 17:50:27 beliskner.site systemd[1]: Starting Pure-FTPd FTP server…
Jun 21 17:50:27 beliskner.site systemd[1]: Started Pure-FTPd FTP server.
Jun 21 17:50:27 beliskner.site pure-config.pl[3562]: Running: /usr/sbin/pure-ftpd -A -b -c10 -C3 -z -D -e -fftp -H -I15 -lpam -L1000… -G -Z
Jun 21 17:50:27 beliskner.site pure-config.pl[3562]: Unable to start a standalone server: Address already in use
Jun 21 17:50:40 beliskner.site systemd[1]: Stopped Pure-FTPd FTP server.
Jun 21 17:50:59 beliskner.site systemd[1]: Starting Pure-FTPd FTP server…
Jun 21 17:50:59 beliskner.site systemd[1]: Started Pure-FTPd FTP server.
Jun 21 17:50:59 beliskner.site pure-config.pl[3576]: Running: /usr/sbin/pure-ftpd -A -b -c10 -C3 -z -D -e -fftp -H -I15 -lpam -L1000… -G -Z
Jun 21 17:50:59 beliskner.site pure-config.pl[3576]: Unable to start a standalone server: Address already in use
beliskner:/home/thor #
Alright, I got it. The issue was with the home folder path which was set on that NTFS windows partition. For some reason it could not set the permissions right. I went in YAST and changed the home folder to /srv/ftp and it works great now.
I will try to see if I can make it run automatically at start-up, but other than that it’s perfect.
Thank you for your help mate.
Yeah, right. You would have to change the mount options for the NTFS partition in that case.
Or perhaps if you run pure-ftpd as system service it has the permissions to access it.
I will try to see if I can make it run automatically at start-up, but other than that it’s perfect.
Thank you for your help mate.
As I said:
sudo systemctl enable pure-ftpd.service
should enable automatic start at boot.
If it doesn’t work, use “systemctl status pure-ftpd.service” to check why.
Sorry, overlooked some of your questions, which I still would like to answer:
I guess you have already started it before by your “/usr/sbin/pure-config.pl /etc/pure-ftpd/pure-ftpd.conf” line. (Your output of “systemctl status pure-ftpd.service” would confirm that)
Of course then the service can’t start because pure-ftpd is already running. You have to kill it first or try directly after a new boot without starting it before.
“sudo systemctl start pure-ftpd” and “sudo stop pure-ftpd” should work then. (you can omit the “.service” since 12.3)
That’s the home directory of the ftp user, that’s what pure-ftpd uses for anonymous access.
The grep should show /srv/ftp there now on your system.
But don’t try to change that directly in /etc/passwd! Use YaST for that, or “usermod”…
Right.
And it seems to be a completely different problem as the one discussed in this thread anyway.
So you should have created a new thread rather than ask your question in this one, that’s been solved over a year ago.