LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-23-2005, 09:38 AM   #1
steffentchr
LQ Newbie
 
Registered: Oct 2005
Posts: 2

Rep: Reputation: 0
vsftpd & "553 could not create file"


I'm setting up vsftpd (2.0.3, FC4) with virtual users. When a user logs in, he should be able to upload files to /ftp, but when I try I'm not able to create/upload files, and I get an "553 Could not create file" error message. I can browse directories and delete files without any problems.

I've printed some info about my basic config, and I hope that you guys will be able to help me...

/Stc



vsftpd.conf:
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_umask=077
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=ftp
xferlog_std_format=YES
pam_service_name=ftp
listen=YES
tcp_wrappers=YES
guest_enable=YES
guest_username=ftp
local_root=/ftp
anon_other_write_enable=YES
chroot_local_user=YES
virtual_use_local_privs=YES



[root@nordsign /]# ls -al
total 242
drwxr-xr-x 30 root root 4096 Oct 19 16:23 .
drwxr-xr-x 30 root root 4096 Oct 19 16:23 ..
(...)
drwxrwxrwx 3 ftp web 4096 Oct 20 10:40 ftp
(...)




Macintosh:~ steffentchr$ ftp ftp.dummy.com
Connected to ftp.dummy.com.
220 (vsFTPd 2.0.3)
Name (ftp.dummy.com):steffentchr): steffen
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
226 Directory send OK.
ftp> put Desktop/stc1
local: Desktop/stc1 remote: Desktop/stc1
229 Entering Extended Passive Mode (|||64727|)
553 Could not create file.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 10-24-2005, 11:17 PM   #2
GaMeS
Member
 
Registered: Jan 2005
Location: France / Bretagne
Distribution: Debian / Gentoo
Posts: 71

Rep: Reputation: 15
hi,

your users "steffen" ..what's her primary and secondary group ?

if you create a file on '/ftp' , users "steffen" can retrieve ? and read it ? or not ?
 
Old 10-25-2005, 12:43 AM   #3
steffentchr
LQ Newbie
 
Registered: Oct 2005
Posts: 2

Original Poster
Rep: Reputation: 0
There's no "steffen" user; along with loads of others it a virtual user mapping against a pam db. As I understand permissions should be based on the ftp-user (guest_username)?

Thanks,
/Stc
 
Old 11-01-2005, 05:06 PM   #4
feathers
LQ Newbie
 
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
I was experiencing the same error. It turned out that a file of the same name already existed in the upload directory.

After deleting the same named file from the upload directory, I got "226 File receive OK."
 
Old 11-16-2008, 04:49 AM   #5
mmiric
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
I solve problem with granting ownership to directory. Command was chown -R webadmin2 /var/www/html.
 
Old 01-23-2012, 01:54 AM   #6
Nuthan Santharam
LQ Newbie
 
Registered: Jan 2012
Location: Bangalore
Distribution: Redhat, Ubuntu
Posts: 1

Rep: Reputation: Disabled
Thumbs up chown -R webadmin2 /var/www/html

chown -R webadmin2 /var/www/html works beautifully....
Response: 226 Directory send OK.
 
1 members found this post helpful.
Old 01-23-2012, 08:34 AM   #7
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_umask=077
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=ftp
xferlog_std_format=YES
pam_service_name=ftp
listen=YES
tcp_wrappers=YES
guest_enable=YES
guest_username=ftp
local_root=/ftp
anon_other_write_enable=YES
chroot_local_user=YES
virtual_use_local_privs=YES
with this setting you are trying to log in using anonymous user

so you should know that by default anonymous user is not allowed to login on any directory having write permission
so you default login directory inside

Code:
/var/ftp/pub
should not have write access

once our anonymous user logs in then he will not be able to create any file or directory
so for this reason create a directory inside pub with full permission

Code:
#mkdir /var/ftp/pub/upload
#chmod 777 /var/ftp/pub/upload
or make sure to give relevant permission as per your use with write permission enabled

so once the anonymous user logs in
Code:
ftp ftp.dummy.com
Connected to ftp.dummy.com.
220 (vsFTPd 2.0.3)
Name (ftp.dummy.com):steffentchr): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
226 Directory send OK.
ftp>pwd
ftp>/var/ftp
ftp>dir
pub
upload
ftp>cd upload
ftp>mkdir test
ftp>dir
test
 
2 members found this post helpful.
Old 04-03-2012, 04:43 PM   #8
AKStorch
LQ Newbie
 
Registered: Jul 2009
Posts: 8

Rep: Reputation: 0
chown -R webadmin2 /var/www/html works beautifully here also
Response: 226 Directory send OK.
 
Old 06-28-2012, 01:52 PM   #9
digital_misfit
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Rep: Reputation: Disabled
Works

Quote:
Originally Posted by Nuthan Santharam View Post
chown -R webadmin2 /var/www/html works beautifully....
Response: 226 Directory send OK.
Second that, works perfectly.
 
  


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
Red hat Install: "No valid devices found on which to create new file systems" Lucky_69 Linux - Software 1 02-06-2007 09:19 PM
VSFTPD Debian VSFTPD "unrecognised variable in config file" DCT Linux - Software 0 05-29-2004 11:59 PM
decrypting a file using "crypt" & "rot13" JAMZM101 Solaris / OpenSolaris 1 03-07-2004 09:32 AM
"mkdir: cannot create directory `foo': Read-only file system" on FAT32 maddes Linux - Hardware 1 11-26-2003 06:19 PM
CSH: "cmd >& file" or "cmd </dev/null >& file" stefanlasiewski Programming 1 09-08-2003 04:19 PM

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

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