LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-10-2010, 05:26 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 898
Blog Entries: 26

Rep: Reputation: 49
configuring vsftpd for upload


I have ubuntu 8.04 which is running vsftpd with following config ( in standalone mode )
Code:
# Standalone mode
listen=YES
max_clients=200
max_per_ip=4
# Access rights
anonymous_enable=YES
local_enable=NO
write_enable=YES
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
# Security
anon_world_readable_only=NO
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
On a windows xp my friend ran filezilla to upload document in folder ( using anonymous i.e ftp as name & password ) /home/ftp/upload (I had already done #chmod 777 /home/ftp/folder)
but he gets
550 : permission denied
critical error.

We both are on office LAN.
He can download & navigate but not upload.
What am I doing wrong ?

Last edited by sumeet inani; 03-10-2010 at 05:36 AM.
 
Old 03-10-2010, 05:33 AM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
anon_upload_enable=NO - upload is disabled.
 
1 members found this post helpful.
Old 03-10-2010, 05:45 AM   #3
kingston
Member
 
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 215
Blog Entries: 1

Rep: Reputation: 21
also change the owner of the /home/ftp/upload directory to ftp
 
Old 03-10-2010, 05:49 AM   #4
sumeet inani
Member
 
Registered: Oct 2008
Posts: 898
Blog Entries: 26

Original Poster
Rep: Reputation: 49
It worked though I should have thought a little before bothering you.
QUESTION
I had done following changes in example config of standalone vsftpd

write_enable=yes (from no)
anon_upload_enable=yes (from no)

after #chmod 777 /home/ftp/upload
I think these are the minimum tweak if you want to upload files in /home/ftp/upload

Last edited by sumeet inani; 03-10-2010 at 09:44 PM.
 
Old 03-10-2010, 06:07 AM   #5
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Hi sumeet,

Just two days before I Configured this and its working fine, You may have a look at these steps:

Code:
1. Installing FTP server
# rpm -ivh vsftpd-2.0.5-16.el5.i386.rpm

2. Configuring FTP server
FTP server has been configured with following changes to  /etc/vsftpd/vsftpd.conf

local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

3. Add group ftp-users
# /usr/sbin/groupadd ftp-users

4. User test1 has been added to the group of ftp-users with /home/ftp-docs as home directory
# /usr/sbin/usermod -g ftp-users -d /home/ftp-docs  test1

5. Ownership and permission of /home/ftp-docs has been changed to provide read/write access to user test1 and group ftp-users
# chown test1.ftp-users /home/ftp-docs
# chmod 770 /home/ftp-docs

6. SElinux Disabled
# echo 0 > /selinux/enforce
I tried above steps by enabling SElinux, it did not work for me. Then I tried disabling SElinux and it worked. Do inform, If you could implement this with SElinux enabled.

Last edited by vinaytp; 03-10-2010 at 06:24 AM.
 
Old 03-31-2010, 06:51 AM   #6
sumeet inani
Member
 
Registered: Oct 2008
Posts: 898
Blog Entries: 26

Original Poster
Rep: Reputation: 49
Also To delete
Code:
ftp>delete File_to_delete.extension
ftp>rmdir folder-to-delete #provided it is empty
OKAY I found out that
anon_mkdir_write_enable=YES(from NO)
allows user to create folder

Another thing I would like to mention that if you ftp to target using terminal & you want to upload abc.jpg(suppose) then run
Code:
ftp> put abc.jpg abc-on-destination.jpg
i.e give target file name unlike on local machine where we just copy or move file to desired folder.
To have no problem in listing content of directories you created add to configuration file
Code:
anon_umask=022

Last edited by sumeet inani; 05-13-2010 at 01:59 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
vsFTPd Help (Unable to Upload) carlosinfl Linux - Server 1 11-06-2008 10:42 AM
Vsftpd Upload Permission Supreme Linux - Software 3 03-14-2008 02:11 PM
vsftpd upload problem in RH nkd Linux - Newbie 2 10-05-2007 10:06 PM
vsftpd upload problem jhod22 Linux - Software 0 04-15-2006 08:38 AM
vsftpd problems: cannot upload ricky_ds Linux - Software 1 08-22-2005 03:37 AM


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