LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-09-2015, 05:15 PM   #1
pankajparegi
LQ Newbie
 
Registered: Apr 2015
Posts: 5

Rep: Reputation: Disabled
Question vsftpd user home directory mounted with cifs but getting error 550


In my RHEL 6 sever space issue so i am mounted new user
home directory to my nas storage with cifs rw permission

but when user using ftp getting error 550 create directory operation failed

vsftpd user home directory mounted with cifs rw permission but getting error 550 create directory operation failed
 
Old 04-09-2015, 05:24 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
You might want to add the following directing in your vsftpd.conf file: virtual_use_local_privs=YES

We had similar thread few days back: http://www.linuxquestions.org/questi...pd-4175538245/

I can see you are using RHEL6, is this a test box or home setup? If yes, then I would suggest moving to CentOS 6 or CentOS 7 because you won't be getting updates with RHEL if you haven't got the subscription.
 
Old 04-11-2015, 01:47 AM   #3
pankajparegi
LQ Newbie
 
Registered: Apr 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by T3RM1NVT0R View Post
You might want to add the following directing in your vsftpd.conf file: virtual_use_local_privs=YES

We had similar thread few days back: http://www.linuxquestions.org/questi...pd-4175538245/

I can see you are using RHEL6, is this a test box or home setup? If yes, then I would suggest moving to CentOS 6 or CentOS 7 because you won't be getting updates with RHEL if you haven't got the subscription.
thanks for reply but its not working... any other option
 
Old 04-11-2015, 08:14 AM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
Can you share the following:

1. vsftpd.conf file.
2. Output of mount command.
3. ls -al where you have mounted the cifs partition.

It will be good if you can explain what you mean by this: "home directory to my nas storage with cifs rw permission". How did you configure NAS and from where CIFS share is coming and how?
 
Old 04-13-2015, 09:28 AM   #5
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 169

Rep: Reputation: Disabled
Do you have selinux enforcing?
Code:
sestatus
If yes then u have to enable home directory boolean
Code:
setsebool -P ftp_home_dir on
 
Old 04-15-2015, 05:41 PM   #6
pankajparegi
LQ Newbie
 
Registered: Apr 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
[root@RHEL Scriptacom]# ls -al
total 4
drwxr-xr-x 1 root root 0 Apr 11 11:09 .
dr-xr-xr-x. 27 root root 4096 Apr 10 01:28 ..
drwxr-xr-x 1 root root 0 Apr 4 01:47 Backup
drwxr-xr-x 1 root root 0 Apr 8 01:39 DATA
drwxr-xr-x 1 root root 0 Apr 3 03:07 General
drwxr-xr-x 1 root root 0 Apr 3 09:02 Management
drwxr-xr-x 1 root root 0 Apr 3 03:11 MT Complete
drwxr-xr-x 1 root root 0 Apr 3 03:18 Patient List
drwxr-xr-x 1 root root 0 Apr 3 03:13 QA Complete
drwxr-xr-x 1 root root 0 Apr 3 03:18 Random Assessment
drwxr-xr-x 1 root root 0 Apr 5 01:37 Sample Files
drwxr-xr-x 1 root root 0 Apr 4 11:37 Sent Files
drwxr-xr-x 1 root root 0 Apr 11 11:09 test
drwxr-xr-x 1 root root 0 Apr 3 03:06 Todays Work
drwxr-xr-x 1 root root 0 Apr 3 03:18 Today Voice
drwxr-xr-x 1 root root 0 Apr 3 03:22 Track Sheet
drwxr-xr-x 1 root root 0 Apr 8 06:21 .Trash-0
drwxr-xr-x 1 root root 0 Apr 3 03:15 Uploaded
drwxr-xr-x 1 root root 0 Apr 4 12:03 Yesterday Voice
[root@RHEL Scriptacom]#

[root@RHEL ~]# cat /etc/vsftpd/vsftpd.conf
# Example config file /etc/vsftpd/vsftpd.conf
#
# 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=YES
#
# 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 to Scriptacom FTP service manged by Pankaj Paregi.
#
# 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
#use localtime
use_localtime=yes
virtual_use_local_privs=YES
[root@RHEL ~]#

I also given 777 permission to /Scriptacom and sub directory
i have rw permission i am able to make and remove directory & files locally but when i am log in from FTP it`s getting error "550 Create directory operation failed.

"/Scriptacom" home directory for user pankaj
i have seagate blackarmor nas 440 in nas one directory with same name Scriptacom and it mounted in my rhel server on /Scriptacom

SELinux is disabled

how to allow ftp users to read & write on CIFS share

Last edited by pankajparegi; 04-15-2015 at 06:28 PM.
 
Old 04-15-2015, 07:39 PM   #7
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
Are you using user: pankaj to login to ftp or you are using ftp user to login to ftp? If you are using anon FTP user then you have uncomment the following lines in your file:

Code:
#anon_mkdir_write_enable=YES
#anon_upload_enable=YES
Apart from that add the following:

Code:
anon_other_write_enable=YES
Restart vsftpd service after making the changes to vsftpd.conf.

Another thing to note is that if you are using anon user the default directory will be /var/ftp/pub, so you have to put that directory /Scriptacom under /var/ftp/pub and give ownership to FTP user. Try this only if above steps doesn't work.
 
Old 04-15-2015, 09:40 PM   #8
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 169

Rep: Reputation: Disabled
U have enable local users to login through ftp, did u listed the user in user_list file?also you have chroot enabled, u have to create a chroot_list directory in /etc/vsftpd
The directory should contain users who you do not wish to chroot to their home directories.
 
Old 04-18-2015, 07:53 PM   #9
pankajparegi
LQ Newbie
 
Registered: Apr 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
Are you using user: pankaj to login to ftp or you are using ftp user to login to ftp? If you are using anon FTP user then you have uncomment the following lines in your file:

Code:
#anon_mkdir_write_enable=YES
#anon_upload_enable=YES
Apart from that add the following:

Code:
anon_other_write_enable=YES
Restart vsftpd service after making the changes to vsftpd.conf.

Another thing to note is that if you are using anon user the default directory will be /var/ftp/pub, so you have to put that directory /Scriptacom under /var/ftp/pub and give ownership to FTP user. Try this only if above steps doesn't work.
I m login with user pankaj
 
Old 04-19-2015, 10:23 PM   #10
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
If you are using chroot environment then why you have both of them set?

Code:
# 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
Comment out either chroot_local_user=yes or chroot_list_file parameter.

If you using pankaj as the user then share the output of the following:

1.
Code:
cat /etc/passwd | grep pankaj
2. Permission and ownership status of /Scriptacom
3. Location of /Scriptacom directory on the system, is it directly under / or somewhere else on the system.
 
Old 04-20-2015, 03:44 PM   #11
pankajparegi
LQ Newbie
 
Registered: Apr 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
If you are using chroot environment then why you have both of them set?

Code:
# 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
Comment out either chroot_local_user=yes or chroot_list_file parameter.

If you using pankaj as the user then share the output of the following:

1.
Code:
cat /etc/passwd | grep pankaj
2. Permission and ownership status of /Scriptacom
3. Location of /Scriptacom directory on the system, is it directly under / or somewhere else on the system.

pankaj:x:500:500::/Scriptacom:/bin/bash
 
Old 04-20-2015, 09:54 PM   #12
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
What about the other two outputs?

Quote:
2. Permission and ownership status of /Scriptacom
3. Location of /Scriptacom directory on the system, is it directly under / or somewhere else on the system.
 
  


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
how to add user in vsftpd with specified home directory a4kata Linux - Newbie 1 02-21-2011 02:27 PM
vsftpd -- keep ftp user inside home directory ahwm Linux - Server 2 08-23-2010 12:37 PM
vsftpd - limit user to his/her home directory kaon Linux - Software 0 01-15-2005 01:32 AM
VSFTPD - lock user to home directory ohleary Linux - Software 3 11-20-2003 03:04 PM
vsFTPd: howto keep a user in his home directory jonnyz Linux - Networking 1 06-20-2003 03:06 PM


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