LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-04-2020, 12:16 PM   #1
Maximal
LQ Newbie
 
Registered: Jun 2020
Posts: 6

Rep: Reputation: Disabled
Force ftp prompt from browser or windows explorer


Hi

I have install vsftpd server vsftpd: version 3.0.2 on a redhat 7.7

Basic configuration
anonymous login is disable, I guess since it is commented in vsftpd.conf
#anonymous_enable=YES

should it be uncommented and adn change to NO like this ?
anonymous_enable=NO

Right now if I put
ftp://1.1.1.1/pub

anyone can access the files wihtout prompt

I have created a btbftp ftp user and create a btbftp group and give him the ownership

drwxr-xr-x 4 btbftp btbftp 61 Jun 2 10:50 pub
-rwxr-xr-x 1 btbftp btbftp 27 May 28 16:32 ftptestfile.txt
drwxr-xr-x 2 btbftp btbftp 55 Jun 3 14:33 incoming
drwxr-xr-x 2 btbftp btbftp 55 Jun 3 14:33 outgoing

I do not want anybody to be able to access whit this ftp://1.1.1.1/pub

I read for days to have a simple configuration or really complete clear step by step to block this access but I am still confuse, I do not have my DNS yet


I saw a solution saying use ftp://user@1.1.1.1/pub, yes it is asking for password but that does not block anybody to get access wit the simple ftp://1.1.1.1/

I need to setup that secure access on the server this will be use by public later


Thanks
 
Old 06-04-2020, 11:35 PM   #2
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Quote:
should it be uncommented and adn change to NO like this ?
anonymous_enable=NO
Yes it should be NO and uncomment it.

Config below from this link: https://gist.github.com/yuikns/d4967...23c89ddd3d155d

Code:
# Example config file /etc/vsftpd/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.
#
# 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.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES

# White List Pattern
userlist_deny=NO
userlist_enable=YES
userlist_file=/etc/vsftpd/user_list

#
# Uncomment this to enable any form of FTP write command.
write_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 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
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES
#

Last edited by JJJCR; 06-04-2020 at 11:38 PM. Reason: edit
 
Old 06-05-2020, 12:36 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Sometimes the commented values in a config file reflect the defaults. Don't know if that's the case with vsftp, as I don't use ftp anymore, but the documentation (man page, etc) should tell you if that's the case.

That said, ftp is a very insecure way to connect/transfer files. You should use sftp, which is (should be) included in your sshd configuration. See man sshd and man sftp.
 
1 members found this post helpful.
Old 06-05-2020, 03:46 PM   #4
Maximal
LQ Newbie
 
Registered: Jun 2020
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks JJJCR it is working

I have modify the vsftpd.conf to
anonymous_enable=NO

Nobody is able from browser or windows explorer to see anything whitout login in

Cheers
 
Old 06-05-2020, 03:53 PM   #5
Maximal
LQ Newbie
 
Registered: Jun 2020
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks scasey I will look into sftp

My goal is to have 2 user one for the client that can put files and retrieve files

and one admin to manage the request

I will try to achieve this maybe with sftp if I can
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] proftpd: windows explorer ftp vs windows cmd ftp panic Linux - Software 4 09-14-2012 01:41 PM
[SOLVED] Make Bash prompt look like Windows C:\ prompt -- *PROBLEM* arkadios Linux - General 5 07-24-2012 11:29 AM
How do I allow ftp uploads via windows explorer? NirvanaBaby Linux - Server 1 08-31-2011 01:32 AM
Windows Explorer window and FTP myzyr Linux - Newbie 2 01-26-2010 06:24 PM
passing parameters from a unix shell prompt into a windows cmd.exe prompt nano2 Programming 1 09-01-2009 11:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration