Solved

vsftpd.conf settings per user basis on rhel

Posted on 2009-05-14
2
3,413 Views
Last Modified: 2013-12-16
Hi All,
I have setup vsftp and umask setup as 022 in vstpd.conf file.
But for one particular user(say user1) the files uploaded should have permissions 664, so I added
user_config_dir=/etc/vsftpd/vsftpd_user1_conf to vsftpd.conf file
and vsftpd_user1_conf is same as vsftpd.conf except umask changed to 002
after i restarted vsftpd service, and put files, but the file uploaded still has 644 permissions and the new configuration effects didn't take place.
I am not sure what I am missing.
Please let me know if you are aware of any.

Thanks in advance.
0
Comment
Question by:vmwarecv1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
omarfarid earned 250 total points
ID: 24395305
I think you need to do the following:

- put below line in vsftpd.conf file

user_config_dir=/etc/vsftpd/vsftpd_user_conf

- under the dir /etc/vsftpd/vsftpd_user_conf copy the config file to the file user1

Please see below lines taken from man page:

"user_config_dir  This powerful option allows the override of any config option specified in the manual page, on a per-user basis. Usage is simple, and is best illustrated with an example. If you set user_config_dir to be /etc/vsftpd_user_conf and then log on as the user "chris", then vsftpd will apply the settings in the file /etc/vsftpd_user_conf/chris for the duration of the session. The format of this file is as detailed in this manual page! PLEASE NOTE that not all settings are effective on a per-user basis. For example, many settings only prior to the user's session being started. Examples of settings which will not affect any behviour on a per-user basis include listen_address, banner_file, max_per_ip, max_clients, xferlog_file, etc."
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 250 total points
ID: 24400633
The problem here is the way you've interpreted the settings:

user_config_dir=/etc/vsftpd/vsftpd_user1_conf
you've thought that th_s option simply is a place to point to specific user config file. But instead it is for specifying where you will keep your user based configuration files. It must be subdirectory. So you'll have user configuration files and each user will have a file specified with his/her username shoud they require special configuration.

so the paramter should read:

user_config_dir=/etc/vsftpd/user_specific

so you need to have a file called user1 under this subdirectory and it should contain this line:

local_umask=002
 
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Hyper-V 2012 Reverse replication of only one server 7 73
umask commands 5 22
Linux Server mapping drive using SSH key 9 53
Require Script-Linux 4 16
The purpose of this article is to demonstrate how we can use conditional statements using Python.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question