We help IT Professionals succeed at work.

Im having trouble making FTP on my Linux Suse box to make a webserver?

thechase22
thechase22 asked
on
581 Views
Last Modified: 2012-06-27
Hi all

So I got a Linux Suse box, and I have all the web apps working fine, I can make sites locally easy no problem.

My problem is this, I want to connect to it via dreamweaver, and to do that I need to install a FTP.

Now ive tried VSFTPD, and looked at soo many tuitorials but having loads of problems.

I wondered if anyone can help me out, or point me in any direction, even a simplier FTP so that I can start uploading sites to my webserver.

Any ideas guys?

Thanks again.
Comment
Watch Question

fridomCEO/Programmer
CERTIFIED EXPERT

Commented:
Well one can install an ftp Daemin on Linux, but is it a good idea really?
Have you though about using rsync to sync contents of you local machine and the webserver?


Now if you don't want to go that way you have to tell us what problems you have a "loads or problems" is as unspecific as can be.

Regards
Friedrich

Author

Commented:
Well i mean where do i start, this Vsftpd, I did what it said, i didnt install it via zip or anyuthing i used the installer.

But i dont know what to do now, I mean im new to linux, I can do basics, like move and rename copy stuff like that.

But some of the documentation just take you to be an expert with linux, quite frustrating.
fridomCEO/Programmer
CERTIFIED EXPERT

Commented:
Well this is partly true Linux documentation is not an easy task to understand but at least you have some documents.

so it does not help you have to read them. There will be a section called installation
And there are some tutorials out there.

first you have to decide a few thing however.
Should the vsftpd work as a stand alone service
or should inetd or xinetd start it

The configuration of vsftpd takes place in a file vsftpd.conf somewhere below /etc
Starting the thing will be probably done from the /etc/init.d/ directory
and you may have called a command called service.

I would assume under Suse you can use yast for configuration of the the ftp Daemon.

You may want to check the files below /usr/share/doc/vsftpd, to get an idea.

If you can not make any use of the written things then you better ask someone with Linux experience to set up the server for you.

Regards
Friedrich
I would suggest you rather use sftp for this particular application.

Inside Dreamweaver, you should have an option to use secure ftp ( If I remember correctly, it is the only other option to "normal" ftp).

Using sftp is much easier to configure, since it is basically an ftp tunneled through ssh, which is a service that is standard and active in most Distributions out there, and usually does not require any extra configuration.

What you would need to do is to make sure you have a specific Unix user account as the owner for the directory where your files are located. Usually, the standard location for html files for Apache is in /var/www/html.

You would then usually create your websites in subfolders in this tree structure, eg.

Virtual website 1: /var/www/html/myweb1
Virtual website2: /var/www/html/myweb2

Simply create new users for each of your virtual webs, or alternatively, one user that has access to the top folder "html" and anything underneath it.

On a production server, it is usually best to have different users for each folder, since it will most likely be meant for different people...

adduser user_web_1 -d /var/www/html/myweb1

then assign password: passwd user_web_1

Now give ownership to the files in the folder:

chown -R user_web_1:apache /var/www/html/myweb1

Now, in Dreamweaver, simply select the "secure" ftp option, and supply the servername, username and password.

 Simply make sure that your server allows connections to port 22 through the firewall and you should be set.




Commented:
Dreamweaver can also use SFTP (Secure FTP), part of the SSH suite. This is a better idea than using straight FTP as passwords are encrypted. SSH is installed by default on SUSE so sftp should already be working.  This page http://www.washington.edu/computing/web/publishing/sftp-dw-mac.html and this page http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14787 will tell you how to configure Dreamweaver to use SFTP.
regards,

Paul
1st of all....may i know which version of suse linux that you are using...

installation of vsftpd is actually not so difficult if you know how to install it with yum. after installed vsftpd , you have to create user/group which can access thru ftp. and if your linux is with SElinux, then you have to disable some of the features on SElinux as well.

Author

Commented:
Thanks for replys all.

Just a note before I try all the above, im runnign Suse Linux version 9.3, this web server that i want to get up and running, its not for buisness or anything, its just me at work making web portals and easy things.

So im just trying to get some experience on how to successfully install a web server and stuff, it really hasnt got to be secure and stuff, just the basics apon the basics, im not really bothered about security for now.

Ill read all above and get back to you.

Author

Commented:
ok I think ive installed the thing.

im going by this link

http://www.vsftpdrocks.org/rpm/

I did this part

Step 2: Startup and test in "standalone" mode

vi /etc/vsftpd/vsftpd.conf

I got the config file up, everything looks ok i think.

It then asked me to start her up with:

/usr/sbin/vsftpd &

I did this and got message

[1] 13766 - 500 00PS: could not bind listening IPv4 socket.

very strange, any idea?

Commented:
Did you do that as root?  FTP runs on privaleged sockets so you need to be root  to start anything that works on that range. If you were check that nothing else was running. Type netstat -l in a terminal and look for any line that says ftp.

Author

Commented:
yea im using root terminal and stuff and just tried that command, I dont see any FTP in there as you asked :)

Commented:
Can you post your conf file and I'll check it against a working example
try to use yum to install/update an application is actually easier than using rpm install.

first go to your terminal there and key in yum. see whther it will come out with some option or help. if yum is installled, it shd come back with some feedback telling you all the option on the yum.

key in :
yum install vsftpd  [hit enter]

then after yum will go to internet and serach for the available vsftpd rpm and compatible version for ur linux and will prompt you yes or no to install...just press 'y' for yes...then it will do the whole thing for you. try this 1st ;) you shd find yum is actually vr useful.

Author

Commented:
sorry for late reply, while i do what puffy said, ill post config here hold on:

# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# If you do not change anything here you will have a minimum setup for an
# anonymus FTP server.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.

# General Settings
#
# Uncomment this to enable any form of FTP write command.
#
write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
#
dirmessage_enable=YES
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#
#nopriv_user=ftpsecure
#
# You may fully customise the login banner string:
#
#ftpd_banner="Welcome to FOOBAR FTP service."
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#
#ls_recurse_enable=YES
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#
#deny_email_enable=YES
#
# (default follows)
#
#banned_email_file=/etc/vsftpd.banned_emails
#
# If  enabled,  all  user  and  group  information in
# directory listings will be displayed as "ftp".
#
#hide_ids=YES

# Local FTP user Settings
#
# Uncomment this to allow local users to log in.
#
local_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#
#local_umask=022
#
# Uncomment to put local users in a chroot() jail in their home directory
# after login.
#
#chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#
#chroot_list_enable=YES
#
# (default follows)
#
#chroot_list_file=/etc/vsftpd.chroot_list
#
# The maximum data transfer rate permitted, in bytes per second, for
# local authenticated users. The default is 0 (unlimited).
#
#local_max_rate=7200


# Anonymus FTP user Settings
#
# Allow anonymous FTP?
#
anonymous_enable=YES
#
# Anonymous users will only be allowed to download files which are
# world readable.
#
anon_world_readable_only=YES
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#
anon_upload_enable=YES
#
# Default umask for anonymus users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#
#anon_umask=022
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#
anon_mkdir_write_enable=YES
#
# Uncomment this to enable anonymus FTP users to perform other write operations
# like deletion and renaming.
#
anon_other_write_enable=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#
#chown_uploads=YES
#chown_username=whoever
#
# The maximum data transfer rate permitted, in bytes per second, for anonymous
# authenticated users. The default is 0 (unlimited).
#
#anon_max_rate=7200


# Log Settings
#
# Log to the syslog daemon instead of using an logfile.
#
syslog_enable=YES
#
# Uncomment this to log all FTP requests and responses.
#
#log_ftp_protocol=YES
#
# Activate logging of uploads/downloads.
#
#xferlog_enable=YES
#
# You may override where the log file goes if you like. The default is shown
# below.
#
#vsftpd_log_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note: This disables the normal logging unless you enable dual_log_enable below.
#
#xferlog_std_format=YES
#
# You may override where the log file goes if you like. The default is shown
# below.
#
#xferlog_file=/var/log/xferlog
#
# Enable this to have booth logfiles. Standard xferlog and vsftpd's own style log.
#
#dual_log_enable=YES
#
# Uncomment this to enable session status information in the system process listing.
#
#setproctitle_enable=YES

# Transfer Settings
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
#
connect_from_port_20=YES
#
# You may change the default value for timing out an idle session.
#
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#
#data_connection_timeout=120
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
#
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# Set to NO if you want to disallow the  PASV  method of obtaining a data
# connection.
#
#pasv_enable=NO

# PAM setting. Do NOT change this unless you know what you do!
#
pam_service_name=vsftpd

# Set listen=YES if you want vsftpd to run standalone
#
listen=YES

Can you believe it took me 20 mins to figure out how to get this file from linux to my pc :D


I don't know why you are not willing to try sftp.
It is nothing different than normal ftp, it just runs via ssh tunnel, BUT the big difference is this: You don't need to fiddle around and configure sftp at all, it's already done for you, you only need to configuire the users and permissions. BTW, that is what you will have to do to get vsftpd working as well, but now you must first battle to get vsftpd working before you can get to the user configuration bit... And remeber the firewall problems with normal ftp. I've seen some cases where it is almost impossible to get normal ftp working thru some firewalls. If you are unlucky enough to be in the same scenario, you will find it close to impossible...


Author

Commented:
Well hold on, maybe your on to something mr psimation.

I orginally did want a basic FTP, but i just searched and that one came up is all, so maybe i should try the basic one as u mentioned?

Author

Commented:
So Psimation, if your still around, what do i do with the users and permissions?
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Man im soo rubish, when I do that commandm says command unknown, do you have anything i can read about the basics of linux, I mean im not sure I know how the infrustructure works and stuff, so im having difficultie, you gave me soo much detail as well, and i really wanna start to progress with it :)
Which command gives you error? Make sure you are "root" when you do these things.
to be root, either log in as root when you start the system, or use the  following from a terminal window:

su -

then provide the root password.

Commented:
*DONT INSTALL* ftp servers. FTP servers is 90s technology.
You must use sftp which works like ssh.
Redhat stopped distributing ftpserver since rh9, because of security concerns

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.