LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-22-2008, 12:40 AM   #1
bkcreddy17
Member
 
Registered: Feb 2008
Location: India-Hyderabad
Distribution: RHEL and Fedora
Posts: 171

Rep: Reputation: 15
Question change path of ftp user


hi,
When we connect to ftp server, it drives to /var/ftp/
If we connect as user it drives to users's home directory.
Now i want to change the user's path to /var/www/. How can we do it?
Thankyou.
 
Old 05-22-2008, 06:45 PM   #2
djsoundfx
Member
 
Registered: May 2008
Distribution: Gentoo, Ubuntu, RHEL, CentOS, BSD, Solaris
Posts: 82

Rep: Reputation: 23
It would help to have a little bit more information on what ftp daemon you're using as well as what system distro you're using.

I like pure-ftpd because its very simple for my users, when I setup a new account I just set their home directory to the path /opt/www/theirsite and then pure-ftpd inherits the rest. However it is possible with pure-ftpd, vsftpd, and others to define a ftp directory that is different from the users' home directories.
 
Old 05-22-2008, 11:14 PM   #3
bkcreddy17
Member
 
Registered: Feb 2008
Location: India-Hyderabad
Distribution: RHEL and Fedora
Posts: 171

Original Poster
Rep: Reputation: 15
My distro is RHEL5 and it is vsftpd. User should be in /home directory. When he logedin through ssh or telnet, he has to go to his home directory. But if he logsin as ftp he has to login to /var/www.
 
Old 05-23-2008, 01:56 AM   #4
djsoundfx
Member
 
Registered: May 2008
Distribution: Gentoo, Ubuntu, RHEL, CentOS, BSD, Solaris
Posts: 82

Rep: Reputation: 23
Its been a little while since I've setup a vsftpd.conf file like I said I made the switch to pure-ftpd an never looked back, its more secure and way easier to setup. However I believe what you need to do is add a line to your vsftpd.conf that looks like this:

local_root=/home/$USER

or

local_root=/home/ftp/$USER

I'll setup vsftpd on a server tomorrow and test around with it, let me know if this fixes your problem.

If you wanna do more reading about vsftpd a good site is http://viki.brainsware.org/
 
  


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
How to change default /var/ftp/pub in ftp(vsftpd) mohd anas Linux - Networking 3 07-08-2011 02:14 PM
script to change unix path to windows path in all files csross Programming 8 04-29-2006 01:05 PM
Suse -- How to export user PATH to super user? w0262 Linux - Newbie 5 01-10-2006 09:39 PM
Set the path systemwide/Set the path for a user with Slackware jayhel Slackware 1 06-12-2005 12:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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