LinuxQuestions.org
Review your favorite Linux distribution.
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 07-27-2009, 01:39 PM   #1
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155
Blog Entries: 2

Rep: Reputation: 15
FTP - changing default directory


Hi ,

i am running redhat ES 4 nad i need to configure ftp. Basically by default if access through web browser like ftp://ipaddress , it goes to pub only. So i added a line in the configuration vsftpd.conf as
local_root=/data/custdata this is what i need if i type via browser ftp://ipaddress but it doesnot come up rather it show the same default dir /pub only. how to change this to custom directory. pls help me out in this concerns


Thanks
 
Old 07-27-2009, 02:56 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Did you restarted vsftpd?
 
Old 07-27-2009, 04:38 PM   #3
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
yes , i did but no use again if i do ftp://ipaddress it shows pub dir only.
 
Old 07-27-2009, 06:11 PM   #4
Suncoast
Member
 
Registered: Apr 2009
Location: Largo, Florida
Distribution: Slackware
Posts: 208

Rep: Reputation: 35
If they are connecting with username/password, that should work, check your folder permissions. (If they are connecting anonymously, use the variable anon_root.) The daemon starts in pub and tries to change into the specified folder, but will "fail silently" if the folder doesn't exist or doesn't have the correct permissions.
 
Old 07-28-2009, 01:06 PM   #5
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
It is working via command line in the linux server with the ftp login but through browser type ftp://ipaddres it take into pub directory only and it doesnot ask any login info which i have created for ftp .Do i need to make any change in the configuration
 
Old 07-28-2009, 05:48 PM   #6
Suncoast
Member
 
Registered: Apr 2009
Location: Largo, Florida
Distribution: Slackware
Posts: 208

Rep: Reputation: 35
You need to add the anon_root=/data/custdata to the vsftpd.conf file.

A word of caution - If anonymous users can write those files, other anonymous users can read it.

Edit - Clarification - If you have anonymous write access, you have no control over miscreants altering or possibly deleting your data.

Last edited by Suncoast; 07-31-2009 at 09:26 AM.
 
Old 07-28-2009, 06:57 PM   #7
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
yes , I added the line anon_root in the config file but it shows the error messages as

500 oops: vsftpd refusing to run with writable anonymous root then i entered ftp login and finally it shows connection interrupted in the browser
 
Old 07-28-2009, 07:39 PM   #8
Suncoast
Member
 
Registered: Apr 2009
Location: Largo, Florida
Distribution: Slackware
Posts: 208

Rep: Reputation: 35
Ok, looks like anon_root is meant for read-only access, as it really should be.

Create a new user account on your system, and give that account access to your /data/custdata, then connect with the url
Code:
ftp://username@www.mydomain.com
Of course use the actual username and domain name you have. You should be prompted for a password, then dropped into the folder you want.
 
Old 07-29-2009, 01:44 PM   #9
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
i created new username gave access to the directory , still it shows the same error like

500 oops: Cannot change directory:/data/cust0011
500 oops: child died
the authentication screen displays behind this error message, after giving login info, it says connection interrupted , the network link was interrupted while negotiating connection
 
Old 07-29-2009, 07:06 PM   #10
Suncoast
Member
 
Registered: Apr 2009
Location: Largo, Florida
Distribution: Slackware
Posts: 208

Rep: Reputation: 35
That still sounds like a permissions issue.
 
Old 07-30-2009, 12:37 AM   #11
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Dear
Change owner of /data/cust0011 to new user name
chown -R newusername: /data/cust0011

Also ensure that that user have execute permission on /data

chmod 755 /data

Thanks
 
  


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
change default vsftp anonymous accout directory /var/ftp to other directory? hocheetiong Linux - Newbie 2 01-24-2010 06:33 PM
Changing default installation directory Arnaud_B Debian 9 05-08-2007 08:07 PM
Changing default terminal login directory mareid Linux - General 1 06-17-2006 10:31 PM
Changing default current directory to / when ftp ckit Linux - Newbie 1 01-27-2004 07:34 PM
Changing default directory / vsftpd chrisknight Linux - Software 5 03-27-2003 06:16 AM

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

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