Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

vsftpd.conf settings per user basis on rhel

Posted on 2009-05-14
2
Medium Priority
?
3,632 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 1000 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 1000 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 Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month5 days, 19 hours left to enroll

772 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