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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-07-2004, 03:36 AM
|
#1
|
LQ Newbie
Registered: Mar 2004
Posts: 29
Rep:
|
changing default directory on "vsftp" server
Hi Everybody,
I am trying to change my defualt directory from /ver/ftp to something else on my vsftp server. It is not working at all. I don't know which files to configure. I've checked the /etc/vsftpd/vsftpd.conf file but could not find anything in there that would help me. I've also tried to create a hard link from that directory to a different one ant it says that it is not allowed to create a link from that directory to where I wanted. I really don't know what can be done here?
Thank you,
xone
|
|
|
04-07-2004, 04:17 AM
|
#2
|
LQ Newbie
Registered: Apr 2004
Posts: 3
Rep:
|
Hi,
To change your ftp root directory, as root, edit /etc/vsftpd/vsftpd.conf and add the following line:
local_root=/opt
This will change the ftp root to /opt, but this can be whatever you feel like.
Save the file and be sure to restart xinetd (not sure if this is necessary, but no harm doing so).
HTH
Nardus
|
|
|
04-07-2004, 06:58 AM
|
#3
|
LQ Newbie
Registered: Mar 2004
Posts: 29
Original Poster
Rep:
|
After I added that line I get a message saying: A connection was refused when attemting to contact ------- name of the server
?
|
|
|
04-08-2004, 05:03 AM
|
#4
|
LQ Newbie
Registered: Apr 2004
Posts: 3
Rep:
|
Hi add the follwoing lines to vsftpd.conf and restart vsftpd afterwards:
local_enable=YES
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
local_root=/opt
This works for me when logging in as normal user via ftp.
|
|
|
01-07-2014, 02:07 PM
|
#5
|
LQ Newbie
Registered: Nov 2007
Posts: 6
Rep:
|
change the ftp user directory to...
to change the default login directory for vsftpd, change the ftp user home directory in /etc/passwd:
ftp:x:116:116:vsftpd daemon:/var/vsftpd:/bin/false
The ftp user (userID=116) home directory changed to /var/vsftpd
This will allow the default/anonymous/unknown user to land into a specific place(/var/vsftpd).
I use this feature to lock down the ftp daemon to a read-only area with a set of general files available for upload. I also have a special directory (/var/vsftpd/upload) which is writeable but not delete-capable. That way, someone can send up a file for share but only I, the site administrator can move/change/delete it.
Hope this helps.
|
|
|
03-09-2018, 06:00 PM
|
#6
|
LQ Newbie
Registered: Mar 2018
Posts: 2
Rep: 
|
Change Home Root Directory on vsftpd 3.0.3 [SOLVED]
Hello,
a couple weeks ago I was trying to change home directory for a ubuntu vsftpd server, then with a little tinkering I figured how to do it
In the terminal type
sudo nano /etc/vsftpd.conf
then scroll to the bottom and add the lines
tcp_wrappers=YES
local_root="Enter DIrectory path ex: /etc/defaults"
don't change anything else, finally type
sudo service vsftpd restart
Using these steps worked for me and i hope it works for you too.
Last edited by tvogamingyt; 03-11-2018 at 05:55 PM.
|
|
|
03-09-2018, 06:35 PM
|
#7
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,356
|
Welcome to LQ!
You have replied to a long dormant thread. It is better to start your own thread with your own description to attract the attention of current members with currently applicable advice.
Also,...
Quote:
Originally Posted by tvogamingyt
then scroll to the bottom and add the lines
tcp_wrappers=YES
local_root=YES
don't change anything else...
|
Is not a valid vsftpd configuration and may potentially leave your system vulnerable to exploit due to an invalid local root directory, which may override any previously given location in the config file. I would advise yourself and others to read man vsftpd.conf and think more clearly about how their vsftp access is configured, with security in mind.
Last edited by astrogeek; 03-09-2018 at 06:45 PM.
Reason: typo
|
|
|
03-11-2018, 05:54 PM
|
#8
|
LQ Newbie
Registered: Mar 2018
Posts: 2
Rep: 
|
REPLY
Sincerest Apologies,
I have made a mistake
in the .conf file add
tcp_wrappers=YES
local_root=/home/User
Replace /home/user with your directory
|
|
|
All times are GMT -5. The time now is 04:11 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|