LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-31-2022, 08:54 AM   #1
goodiemobster
LQ Newbie
 
Registered: Oct 2020
Posts: 5

Rep: Reputation: Disabled
vsftp chroot


Hi,

I have set up vsftp on an ubuntu 20 server but I can't restrict (the only) user to only be able to upload to /var/www/vhosts/my.site.com

Once connected he can browse to all dirs

vsftpd.conf:

Code:
connect_from_port_20=YES
listen=YES
listen_ipv6=NO
pam_service_name=vsftpd
syslog_enable=YES
anonymous_enable=NO
local_enable=YES
local_root=/var/www/vhosts/my.site.com
local_umask=002
write_enable=YES
seccomp_sandbox=NO
chroot_local_user=YES
allow_writeable_chroot=YES
Any advice much appreciated! tnx in advance!
 
Old 01-31-2022, 10:35 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,333
Blog Entries: 3

Rep: Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729
There are so very few legitimate use-cases for 1970s FTP these days in 2022 that I would ask what are your reasons for trying it? Usually most calls for assistance with FTP turn out to be X Y Problems, plus it is quite difficult to set up compared to SFTP.

I would also point out that if you are connecting with SSH then you already have SFTP and can use that. Additionally, most graphical "FTP" clients have built-in SFTP support since many years back. CyberDuck, FileZilla, Nautilus, WinSCP, and so on all can use SFTP. The best part is that SFTP support is part of OpenSSH-server out of the box and is easy, almost trivial to chroot.

Last edited by Turbocapitalist; 01-31-2022 at 10:59 AM.
 
Old 01-31-2022, 10:45 AM   #3
goodiemobster
LQ Newbie
 
Registered: Oct 2020
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi,
Tnx for your reply, I know but our company uses worldwide devs on freelance basis for scraping and some of those devs want it like this.
In our older environment we used plesk for them which was easier to configure.
 
Old 01-31-2022, 10:48 AM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,687

Rep: Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715
Your obsolete solution may be found in articles like this one https://ylmzmtl.com/vsftpd_chroot_home_dir/.
 
Old 01-31-2022, 11:01 AM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,333
Blog Entries: 3

Rep: Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729Reputation: 3729
Quote:
Originally Posted by goodiemobster View Post
Hi,
Tnx for your reply, I know but our company uses worldwide devs on freelance basis for scraping and some of those devs want it like this.
Time for them to examine their software for SFTP support. It's high-risk to use FTP these days and it'd be safer, taking into account improvements and simplifications from the last 2+ decades. But to stall, you can see the link in #4 above.
 
Old 02-01-2022, 08:27 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,693

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by goodiemobster View Post
Hi,
Tnx for your reply, I know but our company uses worldwide devs on freelance basis for scraping and some of those devs want it like this. In our older environment we used plesk for them which was easier to configure.
What is 'scraping' in this context, please?? And if these 'worldwide devs' work for your company, then it is YOUR COMPANY that sets the rules. It's as simple as saying, "We are now using SFTP; if you'd like to work with us, this is what you're going to use, because FTP is incredibly insecure.".
 
1 members found this post helpful.
  


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
vsftp two users sharing same directory both chroot.ish dxtans Linux - Security 4 01-14-2012 06:53 AM
VSFTP - chroot jail implications? OstermanA Linux - Security 8 01-22-2011 01:34 PM
vsftp and chroot question blubbfish Linux - Security 2 10-04-2004 10:03 AM
chroot not working for vsftp anymore noisybastard Linux - Newbie 5 11-26-2003 10:31 PM
vsFTP (and chroot) DATA_OK Linux - Security 10 10-30-2003 10:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:34 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