LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   '553 Could not create file' in vsftpd FTP Server on CentOS 5 (https://www.linuxquestions.org/questions/linux-server-73/553-could-not-create-file-in-vsftpd-ftp-server-on-centos-5-a-602486/)

Fabian10 11-26-2007 10:33 AM

'553 Could not create file' in vsftpd FTP Server on CentOS 5
 
Hello all!

I'm fairly new in the Linux community and I'd like to apologize in advance in case I ask some pretty basic questions.

I'm setting up an FTP Server on a CentOS 5 box, using vsftpd.
I can have users log in and download files, but whenever I want to upload a file I get '553 Could not create file'.

Here is my vsftpd configuration file (without comments):
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=NO
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
ftpd_banner=Welcome to KDTech's FTP Site.
listen=YES
pam_service_name=vsftpd
userlist_enable=NO
tcp_wrappers=YES
dirlist_enable=YES
download_enable=YES
write_enable=YES

Am I missing something?

Also, the vsftpd.log records the following information when I try to upload a file (NewText_SP.doc):

Sun Nov 25 05:19:32 2007 1 192.168.0.245 0 /home/ftp-docs/NewText_SP.doc b _ i r user1 ftp 0 * i

I have disabled SELinux too.

Any help will be much appreciated.

trickykid 11-26-2007 10:36 AM

Probably group ownership with write access to the directory they're trying to upload. Check that and retry. Are the users logging in as anonymous?

Fabian10 11-26-2007 11:13 AM

Group ownership?
 
Hello trickykid, and thank you for your quick reply.
I think you are correct about the problem...
I've done the following regarding ownership, you can tell me if this is correct:

Created a user group and shared directory.
groupadd ftp-users
mkdir /home/ftp-docs

Made the directory accessible to the ftp-users group.
chmod 750 /home/ftp-docs
chown root:ftp-users /home/ftp-docs

Added users, and make their default directory /home/ftp-docs
useradd -g ftp-users -d /home/ftp-docs user1

Created user password
passwd user1

***********************************
Here is my mistake (I think)! :eek:

Changed the permissions of the files in the /home/ftp-docs directory for read only access by the group
[root@bigboy tmp]# chown root:ftp-users /home/ftp-docs/*
[root@bigboy tmp]# chmod 740 /home/ftp-docs/*
***********************************

What should I use here? :confused:


All times are GMT -5. The time now is 01:01 PM.