Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
create mysql -u root -p or create mysql -u vsftpd -p ?
i follow from the guide, create to root and setup vsftpd database.
from your last reply seem to be create to vsftpd
thanks
Hi,
Yes, you create the database as root and then grant 'read' permissions to vsftpd user.
Code:
# mysql -u root -p
CREATE DATABASE vsftpd;
GRANT SELECT ON vsftpd.* TO 'vsftpd'@'localhost' IDENTIFIED BY 'vsftpdpassword'; <-- here you allow user vsftpd to read the database, users are added through root of mysql (which has the permission to insert...)
FLUSH PRIVILEGES;
then if you want 100 or more users with different "home" directories then yes, you need to create different 'config' files for each
Quote:
Hi,
if i want create 100 ftp user then
i need
Quote:
vi /etc/vsftpd/vsftpd_user_conf/user1
with configuration settings in it:
dirlist_enable=YES
download_enable=YES
# full path to the directory where 'user1' will have access, change to your needs
local_root=/home/users/user1
write_enable=YES
to create this to every user ..right ?
otherwise, if you want just 100 users with different usernames/passwords and make them access 'default home' dir
then make sure how this line is defined (the path):
Code:
# here the vsftpd will allow the 'vsftpd' user to login into '/home/vsftpd/$USER directory
guest_enable=YES
guest_username=vsftpd
local_root=/home/vsftpd/$USER
meaning this:
- vsftpd users are located in /home/vsftpd/user1... directory (/home/vsftpd/user2, /home/vsftpd/user3 ...)
so you need to create this directories and make them permissions to vsftpd user
Code:
Now user1's homedir is '/home/vsftpd/user1' , unfortunately vsftpd doesn't create that directory automatically if it doesn't exist. Therefore create it manually now and make it owned by the vsftpd user and group 'users':
mkdir /home/vsftpd/user1
chown vsftpd:users /home/vsftpd/user1
But your main problem is in vsftpd reading username/password from mysql database, so check the settings in "/etc/pam.d/vsftpd "
you need to define the password which you granted to vsftpd user in mysql
ftp setroubleshoot: SELinux is preventing the httpd from using potentially mislabeled files (./locale). For complete SELinux messages. run sealert -l a41c3a9c-7921-47d2-9a60-9de52b48f046
Feb 23 15:59:08 ftp yum-updatesd-helper: error getting update info: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
[root@ftp admin]# sealert -a /var/log/audit/audit.log|less
ERROR: failed to read complete file, 3434396 bytes read out of total 3434155 bytes (/var/log/audit/audit.log)
found 1 alerts in /var/log/audit/audit.log
--------------------------------------------------------------------------------
Summary:
SELinux is preventing vsftpd (ftpd_t) "kill" to <Unknown> (ftpd_t).
Detailed Description:
[SELinux is in permissive mode, the operation would have been denied but was
permitted due to permissive mode.]
SELinux denied access requested by vsftpd. It is not expected that this access
is required by vsftpd and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.
Feb 27 00:02:23 ftp vsftpd: PAM (vsftpd) illegal module type: table=accounts
Feb 27 00:02:23 ftp vsftpd: PAM pam_parse: expecting return value; [...usercolumn=username]
Feb 27 00:02:23 ftp vsftpd: PAM unable to dlopen(/lib64/security/passwdcolumn=pass)
Feb 27 00:02:23 ftp vsftpd: PAM [error: /lib64/security/passwdcolumn=pass: cannot open shared object file: No such file or directory]
Feb 27 00:02:23 ftp vsftpd: PAM adding faulty module: /lib64/security/passwdcolumn=pass
Feb 27 00:02:23 ftp vsftpd: PAM (vsftpd) illegal module type: db=vsftpd
Feb 27 00:02:23 ftp vsftpd: PAM pam_parse: expecting return value; [...table=accounts]
Feb 27 00:02:23 ftp vsftpd: PAM unable to dlopen(/lib64/security/usercolumn=username)
Feb 27 00:02:23 ftp vsftpd: PAM [error: /lib64/security/usercolumn=username: cannot open shared object file: No such file or directory]
Feb 27 00:02:23 ftp vsftpd: PAM adding faulty module: /lib64/security/usercolumn=username
Hi,
I'm sorry but this error (great you posted log) shows that VSFTPd PAM module is not working properly somehow (or maybe not even installed)
so you need to either remove/reinstall, install:
Quote:
You need pam_mysql.so library, which is not included in CentOS installation or is not YUM installable, so you have to install from RPM (or EPEL repository ... or whichever method you prefer).
What is your directory with libraries showing:
Code:
When installed, you should find it:
ls -al /lib/security/pam_m*
-rwxr-xr-x 1 root root 8024 Sep 4 00:51 /lib/security/pam_mail.so
-rwxr-xr-x 1 root root 15848 Sep 4 00:51 /lib/security/pam_mkhomedir.so
-rwxr-xr-x 1 root root 3892 Sep 4 00:51 /lib/security/pam_motd.so
-rwxr-xr-x 1 root root 36920 Feb 28 2008 /lib/security/pam_mysql.so
similar problem I had when configuring VSFTPD and possible solution is here
one more thing can i create user that can view/download/upload file to other user but other user cannot see this user like superuser ?
and i want one more user that cannot view by other user include that superuser like i stated above ?
thanks
Hi,
I'm glad that you got it working, but about the users viewing other's files/directories I tried to explain in post #9 what and how it can be done.
I don't know how else ...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.