LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-01-2010, 05:03 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Rep: Reputation: 48
using vsftpd for browsing & downloading from remote computer


Hi,
i am using vsftpd on ubuntu 8.04.I read the doc which came along & used configuration internet_site_noinetd.Here is vsftpd.conf
Code:
# Standalone mode
listen=YES
max_clients=200
max_per_ip=4
# Access rights
anonymous_enable=YES
local_enable=NO
write_enable=NO
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
# Security
anon_world_readable_only=YES
connect_from_port_20=YES
hide_ids=YES
pasv_min_port=50000
pasv_max_port=60000
# Features
xferlog_enable=YES
ls_recurse_enable=NO
ascii_download_enable=NO
async_abor_enable=YES
# Performance
one_process_model=YES
idle_session_timeout=120
data_connection_timeout=300
accept_timeout=60
connect_timeout=60
anon_max_rate=50000
I want
(1)Presently login is user:anonymous & ditto for password.Can I make it just 'g' for both to reduce typing.
(2)I am stuck in /home/ftp while listing.I want remote user to be able to roam in whole file-system.
 
Old 01-01-2010, 05:18 AM   #2
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
I found out a few things
(1)I can enable local users to login by making following modification
local_enable=YES
one_process_model=NO one process per connection to gain performance so only allowed for anonymous.
(2)if you edit your /etc/vstpd.conf then restart daemon using
Code:
/etc/init.d/vsftpd restart
(3)If you just have anonymous login then do
Code:
$ftp -u IP
Connected to IP
220 (vsFTPD 2.0.6)
ftp>user
(username)anonymous or ftp(YOUR wish)
331 Please specify the password.
Password:same as above
230 login successful 
ftp>
(4)if you want to allow anonymous to access /
Code:
#mkdir /home/ftp/me;mount --bind / /home/ftp/me
Also note that mounted file systems are not accessible in /home/ftp/me.For this you need to create another folder /home/ftp/data(whatever name you want) & then bind partition to it.
(5)Lastly if you have bound a folder to home directory of anonymous.Now your work is done & you want to remove access to that folder for anonynmous then
Code:
#umount /home/ftp/Folder-you-want-to-unbind
Usually ftp is login & passowrd for anonymous.
If you find this post useful than thank me by pressing thumbs up button .Thank You.

Last edited by sumeet inani; 06-10-2010 at 12:33 AM.
 
0 members found this post helpful.
Old 01-01-2010, 05:32 AM   #3
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
(2) in beginning post still unsolved that is how to allow anonymous to roam & download anything ?

Last edited by sumeet inani; 01-01-2010 at 05:41 AM.
 
Old 01-01-2010, 05:55 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Why don't you login as user?
It's not a good idea to give anonymous logins all these privileges
 
Old 01-01-2010, 05:59 AM   #5
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,852

Rep: Reputation: 260Reputation: 260Reputation: 260
Post Commands

Quote:
Originally Posted by sumeet inani View Post
(2) in beginning post still unsolved that is how to allow anonymous to & download anything ?
The user can use linux commands, such as 'ls', and 'cd' to navigate the server, but you seriously don't need people to be able to download the system files on the server the ftp program.

There is a ftp root directory. You can place as many directories off of this root, but it is not the same root as the system uses.

Anonymous ftp uses a person's email (person@mail_server) as the login username, and the word, 'anonymous' as the password

Last edited by AwesomeMachine; 01-01-2010 at 06:04 AM. Reason: forgot something
 
Old 01-01-2010, 06:59 AM   #6
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
Actually my computer is on office network & I want to allow anonymous to download any file he wants.
After all there is no way in which he can modify or delete my files.isn't it ?
 
Old 01-02-2010, 07:54 AM   #7
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,852

Rep: Reputation: 260Reputation: 260Reputation: 260
You can make a link to the root directory, and place it in the ftp root:

ln -s / <ftp_root>
 
Old 01-04-2010, 01:35 AM   #8
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
I tried
#ln -s / /home/ftp/Me
If I browse using graphical file manager then on double clicking it I goto root.
When I run command
ftp>ls -a1
drwxr-xr-x 2 ftp ftp 4096 Jan 04 16:54 .
drwxr-xr-x 2 ftp ftp 4096 Jan 04 16:54 ..
lrwxrwxrwx 1 ftp ftp 1 Jan 04 16:54 Me -> /
ftp>cd Me
250 Directory successfully changed.
ftp> ls -a1
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
drwxr-xr-x 2 ftp ftp 4096 Jan 04 16:54 .
drwxr-xr-x 2 ftp ftp 4096 Jan 04 16:54 ..
lrwxrwxrwx 1 ftp ftp 1 Jan 04 16:54 Me -> /
226 Directory send OK.

So how can command user navigate ?
also note
#ln / /home/ftp/Me
ln: `/': hard link not allowed for directory

Last edited by sumeet inani; 01-04-2010 at 01:44 AM.
 
Old 01-05-2010, 12:42 AM   #9
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
finally I have been able to allow anonymous to access whole file system.Please see second post.
I have noticed that if you restart your system then you have to rebind folder in ftp to file system using
Code:
#mount --bind DirectoryOfFileSystem DirectoryInFTP

Last edited by sumeet inani; 02-18-2010 at 05:29 AM.
 
Old 02-24-2010, 05:38 AM   #10
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
Here is to monitor those who connected to your server
http://wiki.inisec.com/index.php/Monitor_vsftp

Last edited by sumeet inani; 08-11-2010 at 06:36 AM. Reason: found out myself
 
Old 02-24-2010, 05:38 AM   #11
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Original Poster
Rep: Reputation: 48
SOLUTION

(2)Also there was a security thing when I bind my ntfs partition to a folder in anonymous. Its contents can be deleted .

SO I edited vsftpd.conf
Code:
anon_other_write_enable=NO
now deletion & renaming not allowed.

Last edited by sumeet inani; 08-11-2010 at 06:37 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Browsing while downloading torrents immediately chokes network (TCP backoff??) saravkrish Linux - Networking 1 03-16-2007 02:31 PM
During downloading - knobbled browsing question GTrax Linux - Software 1 01-14-2007 12:27 PM
VSFTPD Configuration to restrict user browsing wizzkid8 Linux - Software 1 03-04-2006 07:50 AM
Samba and browsing files with vsftpd tsimm Linux - Software 0 02-14-2004 09:41 AM
Browsing while downloading with Mozilla funkenbooty Linux - Newbie 1 07-22-2003 09:00 PM


All times are GMT -5. The time now is 10:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration