LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-19-2008, 11:32 PM   #1
roni_atx
LQ Newbie
 
Registered: Jul 2008
Posts: 10

Rep: Reputation: 0
unable download the file through "put" command for anonymous user


Hi all.
I have made ftp server.But from the client side I am not able to download the file(client to server) through "put" command for anonymous user.Details given bellow.

Server computer IP 200.200.200.72
Client computer IP 200.200.200.83


Server Side(200.200.200.72)

My FTP share directory is "/var/ftp"

I have made three files in this directory.Files r given "a , b , c"

1.I have install vsftpd package
2.cd /etc/vsftpd/vsftpd.conf
3.vim vsftpd.conf

anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=002
anon_upload_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
chown_uploads=YES
chown_username=daemon
xferlog_std_format=YES
listen=yes
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=yes


4. getsebool -a |grep ftpd
5. setsebool -P allow_ftpd_anon_write=on
setsebool -P allow_ftpd_full_access=on
setsebool -P allow_ftpd_use_cifs=on
setsebool -P allow_ftpd_use_nfs=off
setsebool -P ftpd_disable_trans=on
setsebool -P ftpd_is_daemon=on
setsebool -P tftpd_disable_trans=on

6.getsebool -a |grep ftp
setsebool -P ftp_home_dir=on
httpd_enable_ftp_server=on

7.made as enforcing mode(Selinux)
8.chkconfig --list |grep vsftpd
9.chkconfig --list |grep ftp
10.chkconfig vsftpd on
11.chkconfig ftp on
12.service vsftpd start

Client Side(200.200.200.83)

1.cd/root/
2.cat >myftp

3.ftp 200.200.200.72
4.username as "anonymous"
5.password "enter"

Now I tried lots of procedure, But I did not succeed.Procedure given bellow.


6.put
(local-file)myftp
(remote-file)/var/ftp/myftp

or
put
(local-file)myftp
(remote-file)/var/ftp/

or
put
(local-file)myftp
(remote-file)/root/myftp

or
put
(local-file)myftp
(remote-file)/root/

or
put
(local-file)/root/myftp
(remote-file)/var/ftp/myftp

or
put
(local-file)/root/myftp
(remote-file)/var/ftp/

or
put
(local-file)/root/myftp
(remote-file)/ftp/myftp

or
put
(local-file)/root/myftp
(remote-file)/ftp/

or
put
(local-file)myftp
(remote-file)/ftp/

or
put myftp

Nothing is working. Even I am getting following errors.[B]

"Entering passive mode(200,200,200,72,37,112)
553 could not create file
"

So can you suggest me that how can I download the file through "put" command!

Thank you all
 
Old 11-20-2008, 02:07 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Make sure that the directory /var/ftp is owned by the anonymous user. Usually this user's uid is ftp (but you need to check if this is true for your system), so you need to:
Code:
chown -R ftp /var//ftp
Note that with "put" you upload files in the server (not download). With "get" you download files.
 
Old 11-20-2008, 02:55 AM   #3
roni_atx
LQ Newbie
 
Registered: Jul 2008
Posts: 10

Original Poster
Rep: Reputation: 0
As per your Suggestions I tried with that command.But still it is not working.Now I am facing another error.Details given bellow

1.ll /var

output was "drwxr-xr-x 4 root root 4096 Nov 20 00:32 ftp"

2.chown -R ftp /var//ftp

output was "drwxr-xr-x 4 ftp root 4096 Nov 20 00:32 ftp"

3.service vsftpd restart

4.(from the client side) ftp 200.200.200.72
gave user as "anonymous"
password"press enter"

5.After that "500 OOPS: vsftpd: refusing to run with writable anonymous root
Login failed."
this error appeared.

6.Then i gave "chgrp root /var/ftp/"

output was "drwxr-xr-x 4 ftp ftp 4096 Nov 20 00:32 ftp"

7.Again I tried. (from the client side) ftp 200.200.200.72
gave user as "anonymous"
password"press enter"

8.same error appeared. "500 OOPS: vsftpd: refusing to run with writable anonymous root
Login failed."


So what to do now!
 
Old 11-20-2008, 03:15 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can read this to see how you can overcome this problem. You need to add
Code:
anon_root=/var/ftp/pub
in vsftpd.conf

Regards

Last edited by bathory; 11-20-2008 at 03:17 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for good or best "multi-thread" or "multiple download" download manger. brjoon1021 Linux - Software 1 09-25-2008 03:26 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
Samba- on "put file x" says file does not exist? achtung_linux Linux - Software 3 08-22-2006 01:30 PM
Who put file "dirlist" here? branch Linux - Newbie 4 11-20-2004 07:23 PM
cvs wine. Unable to download. Error "cvs: command not found" gonus Debian 5 08-03-2004 07:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:43 AM.

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