Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-11-2012, 06:55 PM   #1
Registered: Aug 2011
Location: /home
Posts: 96

Rep: Reputation: Disabled
cannot create a file in my local ftp server

hi everybody,
i cannot create a folder, file and even cannot rename on my local ftp server.

anonymous_enable=NO ( i changed it to NO )

# getenforce

#setsebool - P ftp_home_dir=1

# getsebool -a | grep ftp_home_dir
ftp_home_dir --> on

# service vsftpd status
vsftpd (pid 1262) is running...

# groupadd ftpusers

# useradd ashim

# passwd ashim

# pwd

# usermod -aG ftpusers -d /var/ftp/pub/files ashim

# chown root:ftpusers /var/ftp/pub/files

# chmod g+w /var/ftp/pub/files

# service vsftpd restart

i have checked after giving this command
# chown root:ftpusers /var/ftp/pub/files and
# chmod g+w /var/ftp/pub/files

# pwd
# ll
drwxr-xr-x. 23 root root 4096 May 11 01:41 var

# ll
drwxr-xr-x. 3 root root 4096 May 11 01:41 ftp

# pwd
# ll
drwxr-xr-x. 3 root root 4096 May 12 08:44 pub

# pwd
# ll
drwxrwxr-x. 2 root ftpusers 4096 May 12 10:03 files

i have install centos in my desktop and windows 7 on my laptop.

1) (from windows) i can download a file but when try to upload data in ftpserver= "/var/ftp/pub/files from my client laptop using windows 7 os the following error occurs

550 create directory operation failed

2) (in centos) when i try to make directory inside /var/ftp/pub/files/ the error occurs

# ftp
Connected to (
220 (vsFTPd 2.2.2)
Name ( ashim
331 Please specify the password.
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/var/ftp/pub/files"
ftp> mkdir test
550 Create directory operation failed.

hostname = server and my ip = when i do it works but when i try ftp://server it does not work.

i have menson the setp's i have done but i was not able to upload a file , create a file and rename a file. can anybody guide me in right way i'll be greatful and any kinds of ideas, suggestions and guidelines are welcome.


Last edited by paruhang; 05-11-2012 at 07:09 PM.
Old 05-11-2012, 08:46 PM   #2
LQ Newbie
Registered: May 2012
Posts: 13

Rep: Reputation: Disabled
I recently tried doing this but after much reading and editing i found it extremely tedious.

One thing i found you need to do however is once you FTP into your server "ftp: number)" you need to authenticate by right clicking in the FTP folder window and clicking login. You will then use your system credentials to log in. Unless you have it set up correctly, the user you authenticate with must be a real user on the server.

So if on your server, you have a user called, "Server", and that user has a valid password, you will need to enter that information in in order to have full read/write/execute access.
Old 05-12-2012, 10:51 AM   #3
Registered: Aug 2011
Location: /home
Posts: 96

Original Poster
Rep: Reputation: Disabled
thank you, ExemptOA.
for your quick reply. what i want to do is just want to create folder , rename and edit by logging in specific user which i have login.

when i switch to # setenforce 0. i can create, rename and edit file but when i switch to # setenforce 1 i cannot able to create, rename and edit file . i think i have to manage selinux but i don't know where and how to do this.

can anybody help me to fix my problems any kinds of ideas, suggestions are welcome and i'll be greatful.

Old 05-13-2012, 08:01 PM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,365

Rep: Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752
Some good SELinux explanations/howtos in this doc
Mostly you'll want Chap 44; see Chap 43 for background theory.


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
How to create a local mail archive server? (or is it possible) vishyc88 Linux - Server 6 03-21-2012 07:07 AM
ftp user can't create a directory on ftp server bharatlalgupta Red Hat 4 01-27-2010 01:58 PM
'553 Could not create file' in vsftpd FTP Server on CentOS 5 Fabian10 Linux - Server 2 11-26-2007 11:13 AM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 04:24 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration