Advertisement
Guest User

igalgayz

a guest
Feb 10th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.41 KB | None | 0 0
  1.  
  2. 1
  3. down vote
  4. favorite
  5. I want to set up a FTP server on Ubuntu 14.04 I have full access to the server and any tutorial I find online doesn't tell me exactly how to access it.
  6.  
  7. I am using VSFTPD because of many suggestions.
  8.  
  9. However it still doesn't quite answer the question of using an FTP for server access, as in it should allow anonymous people to download from it.
  10.  
  11. Any help would be appreciated
  12.  
  13. (My friend's FTP website he bought) http://uje.dev9.org/etmain/
  14.  
  15. This would be an example of something I want to set up. Anything even close to this would work, I just want to be able to anonymously download from it.
  16.  
  17. EDIT
  18.  
  19. Changed some settings because of another askubuntu thread.
  20.  
  21. anonymous_enable=YES
  22. local_enable=NO
  23. write_enable=NO
  24. anon_root=/srv/ftp
  25. anon_max_rate=2048000
  26. xferlog_enable=YES
  27. listen=YES
  28. My last issue I have is that, even when I try to connect anonymously, it still asks me for a password. How do I fix that?
  29.  
  30. My config is:
  31.  
  32. # Example config file /etc/vsftpd.conf
  33. #
  34. # The default compiled in settings are fairly paranoid. This sample file
  35. # loosens things up a bit, to make the ftp daemon more usable.
  36. # Please see vsftpd.conf.5 for all compiled in defaults.
  37. #
  38. # READ THIS: This example file is NOT an exhaustive list of vsftpd options.
  39. # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
  40. # capabilities.
  41. #
  42. #
  43. # Run standalone? vsftpd can run either from an inetd or as a standalone
  44. # daemon started from an initscript.
  45. listen=YES
  46.  
  47. anon_root=/src/ftp
  48.  
  49. anon_max_rate=2048000
  50. #
  51. # Run standalone with IPv6?
  52. # Like the listen parameter, except vsftpd will listen on an IPv6 socket
  53. # instead of an IPv4 one. This parameter and the listen parameter are mutually
  54. # exclusive.
  55. #listen_ipv6=YES
  56. #
  57. # Allow anonymous FTP? (Disabled by default)
  58. anonymous_enable=YES
  59. #
  60. # Uncomment this to allow local users to log in.
  61. local_enable=NO
  62. #
  63. # Uncomment this to enable any form of FTP write command.
  64. write_enable=NO
  65. #
  66. # Default umask for local users is 077. You may wish to change this to 022,
  67. # if your users expect that (022 is used by most other ftpd's)
  68. #local_umask=022
  69. #
  70. # Uncomment this to allow the anonymous FTP user to upload files. This only
  71. # has an effect if the above global write enable is activated. Also, you will
  72. # obviously need to create a directory writable by the FTP user.
  73. #anon_upload_enable=YES
  74. #
  75. # Uncomment this if you want the anonymous FTP user to be able to create
  76. # new directories.
  77. #anon_mkdir_write_enable=YES
  78. #
  79. # Activate directory messages - messages given to remote users when they
  80. # go into a certain directory.
  81. dirmessage_enable=YES
  82. #
  83. # If enabled, vsftpd will display directory listings with the time
  84. # in your local time zone. The default is to display GMT. The
  85. # times returned by the MDTM FTP command are also affected by this
  86. # option.
  87. use_localtime=YES
  88. #
  89. # Activate logging of uploads/downloads.
  90. ferlog_enable=YES
  91. #
  92. # Make sure PORT transfer connections originate from port 20 (ftp-data).
  93. connect_from_port_20=YES
  94. #
  95. # If you want, you can arrange for uploaded anonymous files to be owned by
  96. # a different user. Note! Using "root" for uploaded files is not
  97. # recommended!
  98. #chown_uploads=YES
  99. #chown_username=whoever
  100. #
  101. # You may override where the log file goes if you like. The default is shown
  102. # below.
  103. #xferlog_file=/var/log/vsftpd.log
  104. #
  105. # If you want, you can have your log file in standard ftpd xferlog format.
  106. # Note that the default log file location is /var/log/xferlog in this case.
  107. #xferlog_std_format=YES
  108. #
  109. # You may change the default value for timing out an idle session.
  110. #idle_session_timeout=600
  111. #
  112. # You may change the default value for timing out a data connection.
  113. #data_connection_timeout=120
  114. #
  115. # It is recommended that you define on your system a unique user which the
  116. # ftp server can use as a totally isolated and unprivileged user.
  117. #nopriv_user=ftpsecure
  118. #
  119. # Enable this and the server will recognise asynchronous ABOR requests. Not
  120. # recommended for security (the code is non-trivial). Not enabling it,
  121. # however, may confuse older FTP clients.
  122. #async_abor_enable=YES
  123. #
  124. # By default the server will pretend to allow ASCII mode but in fact ignore
  125. # the request. Turn on the below options to have the server actually do ASCII
  126. # mangling on files when in ASCII mode.
  127. # Beware that on some FTP servers, ASCII support allows a denial of service
  128. # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
  129. # predicted this attack and has always been safe, reporting the size of the
  130. # raw file.
  131. # ASCII mangling is a horrible feature of the protocol.
  132. #ascii_upload_enable=YES
  133. #ascii_download_enable=YES
  134. #
  135. # You may fully customise the login banner string:
  136. #ftpd_banner=Welcome to blah FTP service.
  137. #
  138. # You may specify a file of disallowed anonymous e-mail addresses. Apparently
  139. # useful for combatting certain DoS attacks.
  140. #deny_email_enable=YES
  141. # (default follows)
  142. #banned_email_file=/etc/vsftpd.banned_emails
  143. #
  144. # You may restrict local users to their home directories. See the FAQ for
  145. # the possible risks in this before using chroot_local_user or
  146. # chroot_list_enable below.
  147. #chroot_local_user=YES
  148. #
  149. # You may specify an explicit list of local users to chroot() to their home
  150. # directory. If chroot_local_user is YES, then this list becomes a list of
  151. # users to NOT chroot().
  152. # (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
  153. # the user does not have write access to the top level directory within the
  154. # chroot)
  155. #chroot_local_user=YES
  156. #chroot_list_enable=YES
  157. # (default follows)
  158. #chroot_list_file=/etc/vsftpd.chroot_list
  159. #
  160. # You may activate the "-R" option to the builtin ls. This is disabled by
  161. # default to avoid remote users being able to cause excessive I/O on large
  162. # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
  163. # the presence of the "-R" option, so there is a strong case for enabling it.
  164. #ls_recurse_enable=YES
  165. #
  166. # Customization
  167. #
  168. # Some of vsftpd's settings don't fit the filesystem layout by
  169. # default.
  170. #
  171. # This option should be the name of a directory which is empty. Also, the
  172. # directory should not be writable by the ftp user. This directory is used
  173. # as a secure chroot() jail at times vsftpd does not require filesystem
  174. # access.
  175. secure_chroot_dir=/var/run/vsftpd/empty
  176. #
  177. # This string is the name of the PAM service vsftpd will use.
  178. pam_service_name=vsftpd
  179. #
  180. # This option specifies the location of the RSA certificate to use for SSL
  181. # encrypted connections.
  182. rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
  183. # This option specifies the location of the RSA key to use for SSL
  184. # encrypted connections.
  185. rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
  186. 14.04 server ftp
  187. shareimprove this question
  188. edited Dec 3 '14 at 17:16
  189. asked Dec 2 '14 at 6:16
  190.  
  191. Technocrat
  192. 613
  193. add a comment
  194. 1 Answer
  195. active oldest votes
  196. up vote
  197. 0
  198. down vote
  199. I prefer vsftpd in Ubuntu. They have a guide with the anonymous access configuration. This is taken from https://help.ubuntu.com/10.04/serverguide/ftp-server.html
  200.  
  201. By default vsftpd is configured to only allow anonymous download. During installation a ftp user is created with a home directory of /home/ftp. This is the default FTP directory.
  202.  
  203. If you wish to change this location, to /srv/ftp for example, simply create a directory in another location and change the ftp user's home directory:
  204.  
  205. sudo mkdir /srv/ftp
  206. sudo usermod -d /srv/ftp ftp
  207. After making the change restart vsftpd:
  208.  
  209. sudo /etc/init.d/vsftpd restart
  210. Finally, copy any files and directories you would like to make available through anonymous FTP to /srv/ftp.
  211.  
  212. shareimprove this answer
  213. answered Dec 2 '14 at 9:23
  214.  
  215. f01
  216. 20114
  217.  
  218. I didn't have a 'vsftpd' inside of /init.d/ however I had a 'vsftpd.conf' file inside of /etc/ I changed some of the settings in it to match another post here on askubuntu. However the last problem I have is that, it still asks for password even if I try to connect anonymously. – Technocrat Dec 3 '14 at 15:42
  219.  
  220. Check out /var/log/vsftpd.log what the error is, also please share your config. :) – f01 Dec 3 '14 at 16:48
  221.  
  222. It is uploaded now. And I do not have that directory or that log file. – Technocrat Dec 3 '14 at 17:15
  223.  
  224. Try reinstalling vsftpd - sudo aptitude reinstall vsftpd. Also restarting vsftpd - sudo /etc/init.d/vsftpd restart. – f01 Dec 3 '14 at 20:31
  225.  
  226. It says '/etc/init.d/vsftpd: command not found' – Technocrat Dec 4 '14 at 6:18
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement