LinuxQuestions.org
Help answer threads with 0 replies.
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 11-07-2015, 04:05 AM   #1
smoking gun
LQ Newbie
 
Registered: Nov 2015
Posts: 3

Rep: Reputation: Disabled
Why can't I upload file to vsftpd server using anonymous account?


I am configuring vsftpd to allow anonymous user to upload files:
I enabled all below parameters
---------------------------------------------
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_umask=077
anon_upload_enable=YES
anon_mkdir_write_enable=YES

log_ftp_protocol=YES
vsftpd_log_file=/var/log/vsftpd.log
anon_root=/var/ftp/pub
dual_log_enable=YES
syslog_enable=YES
---------------------------------------------

the directories setting:
---------------------------------------------
ls -l /var/ftp/
total 4
drwxr-xr-x 3 root root 4096 Nov 7 16:22 pub

ls -l /var/ftp/pub/
total 4
drwxr-xr-x 2 root root 4096 Nov 7 16:22 incoming

---------------------------------------------

when I tried upload file to directory incoming:

ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
drwxr-xr-x 2 0 0 4096 Nov 07 08:22 incoming
226 Directory send OK.
ftp> cd incoming
250 Directory successfully changed.
ftp> put /root/tmp.txt
local: /root/tmp.txt remote: /root/tmp.txt
200 PORT command successful. Consider using PASV.
553 Could not create file.
ftp>

Could someone help to point out what is wrong with my setting?
I also tried to enable vsftpd log, it is supposed to be at /var/log/vsftpd.log
but i can't find this file.
 
Old 11-07-2015, 04:12 AM   #2
smoking gun
LQ Newbie
 
Registered: Nov 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
mistake
i should use put tmp.txt instead of using put /root/tmp.txt.

after using put tmp.txt
it works

ftp> put tmp.txt
local: tmp.txt remote: tmp.txt
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 Transfer complete.
5069 bytes sent in 0.0364 secs (139.30 Kbytes/sec)
 
Old 11-07-2015, 04:22 AM   #3
smoking gun
LQ Newbie
 
Registered: Nov 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
ftp> ls -l
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
drwxrwxrwx 2 0 0 4096 Nov 07 09:05 incoming
226 Directory send OK.
ftp> cd incoming
250 Directory successfully changed.
ftp> ls -l
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-rw-rw- 1 14 50 5069 Nov 07 09:05 tmp.txt
226 Directory send OK.
ftp> put tmp.txt
local: tmp.txt remote: tmp.txt
200 PORT command successful. Consider using PASV.
553 Could not create file.

2nd question:
why can't I override tmp.txt?
from the parent directory and the file directory, the permission seem to OK.
Could someone help to point out my mistake?
 
  


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
With VSFTPD, allowing Anonymous to upload in a directory, but not download Zoberraz Linux - Newbie 3 04-17-2013 03:43 PM
anonymous users can't upload files-vsftpd dx0r515t Linux - Networking 3 11-21-2012 12:09 AM
Anonymous upload to external NTFS harddrive with vsftpd ConnyJ Linux - Server 4 10-09-2010 05:02 PM
VSFTPD anonymous upload mask Mogaba Linux - Server 1 03-19-2009 01:06 AM
Anonymous upload with vsftpd 1.1.0 Jesus0190 Linux - Software 0 01-04-2003 05:40 PM

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

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