Solved

vsftpd.conf settings per user basis on rhel

Posted on 2009-05-14
2
3,229 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
2 Comments
 
LVL 40

Accepted Solution

by:
omarfarid earned 250 total points
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now