LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-09-2014, 02:19 AM   #1
thalakos
LQ Newbie
 
Registered: Jun 2014
Posts: 1

Rep: Reputation: Disabled
Centos 6.4 VSFTPD user Upload Issue


I'm running a CentOS 6.4 Server and I've installed VSFTPD. Local users are able to log into VSFTPD but I am unable to upload to the server and are not able to list the contents of there "home/user/" directories

/etc/vsftpd/vsftpd.conf file output:
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
#xferlog_file=/var/log/xferlog
#
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=NO
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome
banner_file=/etc/vsftpd/vsftpbanner
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd with two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
listen_port=21
user_config_dir=/ftp/
pasv_enable=YES
pasv_min_port=64000
pasv_max_port=64321
port_enable=Yes
VSFTPD is running:

[dn@LCLXIMPHQSRV1 /]$ service vsftpd status
vsftpd (pid 19914) is running...


I've been primarily testing using my local account on the server "dn". According to what I understand for linux permissions as the owner of the directory I have read/write/execute permission for my home directory folder.

[dn@LCLXIMPHQSRV1 /]$ ls -la /home/
total 36
drwxr-xr-x. 6 root root 4096 Apr 10 15:21 .
dr-xr-xr-x. 27 root root 4096 Jun 9 16:50 ..
drwx------. 23 dn dn 4096 Jun 9 15:13 dn
drwx------. 2 root root 16384 Nov 6 2013 lost+found

I've also tried disabling SELinux temporarily:

[dn@LCLXIMPHQSRV1 /]$ sudo setenforce 0
.....
[dn@LCLXIMPHQSRV1 /]$ sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted

I've done some research on this issue and tried a few solutions posted however they haven;t resolved the issue. Can anyone assist or provide any suggestions?
 
Old 06-09-2014, 03:15 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
I've been primarily testing using my local account on the server "dn". According to what I understand for linux permissions as the owner of the directory I have read/write/execute permission for my home directory folder.
If you want vsftpd to list files/folders or enter a users homedir, you should use 755 permissions on it
 
Old 06-09-2014, 03:51 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...additionally:
Quote:
Originally Posted by thalakos View Post
I'm running a CentOS 6.4 Server
So it's one upgrade behind. Please upgrade and keep your software up to date always.


Quote:
Originally Posted by thalakos View Post
I am unable to upload to the server and are not able to list the contents of there "home/user/" directories(..)
Couple of things in no particular order:
- Always enable logging and make it a first reflex to check the relevant logs for clues,
- Avoid saying "doesn't work" or "unable to.." or talk about "solutions" but post the commands, relevant log excerpts (if any) and what you've tried,
- Please note posting a stock /etc/vsftpd/vsftpd.conf does not make sense. Research, know and tune the options available yourself,
- Also note Vsftpd comes with a set of examples in /usr/share/doc/vsftpd*/EXAMPLE/*/ to try and use.


Quote:
Originally Posted by thalakos View Post
I've also tried disabling SELinux temporarily
Unless there's a clear indication in /var/log/messages or /var/log/audit/audit.log (as in 'grep vsftp /var/log/audit/audit.log|audit2allow') please don't disable SELinux as a first reflex.
 
  


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
how to create a new user for ftp upload in a web server using vsftpd centos SarahGurung Linux - Newbie 2 06-18-2012 02:39 PM
CentOS 5 + vsftpd + upload = error diezzler Linux - Networking 3 01-18-2008 10:59 AM
Redhat ES3 / vsftpd file upload permissions issue c955437 Linux - Software 4 07-19-2007 08:51 AM
Mac user cannot upload files,vsftpd frankotse Linux - Networking 1 07-06-2005 03:16 PM
VSFTPD virtual user can upload, delete, but not download ! exalik Linux - Networking 2 10-20-2003 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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