Solved

vsftpd.conf settings per user basis on rhel

Posted on 2009-05-14
2
3,270 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
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

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
I think my Ubuntu 12.10 box is hacked, but not sure... 13 53
High Available Storage based on linux 6 69
nagios alerts 3 33
AD LDAP LDS 3 48
Understanding FTPS File transfer is a common requirement in most Enterprises. While there are numerous ways to get a file from Point A to Point B over a network, perhaps the most common method still in use is FTP – File Transfer Protocol. FTP is …
Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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…

920 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

13 Experts available now in Live!

Get 1:1 Help Now