FTP new upload file server other ordinary users no read and write permission issues

Source: Internet
Author: User

First, the solution of ideas

Common users and FTP service users a user group to achieve the following effect:

1. User team FTP User directory has read and write permissions

2, the newly uploaded directory, the file, the group user has the read and write permission

Ii. Description of the problem

FTP vs. normal User:
1, the program runs the user Prouser, the user group also is Prouser
2, FTP service user ftpuser, user directory/home/ftpuser
Prouser to FTP directory permission requirements:
1, Prouser users have read and write access to/home/ftpuser
2, Prouser users to Ftpuser uploaded directories and files have read and write permission
3, Ftpuser users are not allowed to log in
Build steps:
1, download vsftpd corresponding RPM package
2. Installation
root# RPM-IVH vsftpd-2.2.2-24.el6.x86_64.rpm
3. Configuration modification
root# vim vim/etc/vsftpd/vsftpd.conf Modifying the FTP service configuration
# prohibit anonymous users from using
Anonymous_enable=no
# permission to upload a directory file is 775
local_umask=002
# Use/etc/vsftpd/user_list as a whitelist
Userlist_deny=no
root# Vim/etc/vsftpd/user_list Annotate other users and add Ftpuser users
Ftpuser
4, new FTP user, user name Ftpuser, user group for the program run user prouser group name
root# useradd-g prouser-s/bin/bash ftpuser
root# passwd ftpuser set ftpuser user password to Ftpuser
root# Chmod-r 775/home/ftpuser
5, modify the FTP user home directory file permissions
root# chmod-r 775/home/ftpuser Modify Home directory permissions
root# Su-ftpuser
ftpuser# umask 0002 Modify FTP User The default permission for newly created directory files is 775
ftpuser# mkdir record Create upload directory
ftpuser# mkdir Backup creates a directory to which the uploaded file is parsed and moved to
ftpuser# exit
6, test program user permissions to the FTP home directory
root# Su-prouser
prouser# Ls-al/home/ftpuser must be successfully viewed
prouser# Mkdir/home/backup/test must successfully create the directory
prouser# Rm-rf/home/backup/test must successfully delete the directory
prouser# TOUCH/HOME/BACKUP/A must successfully create the file
prouser# rm-rf/home/backup/a must delete file successfully
prouser# exit
7. Access the FTP directory and upload the test folder
Ftp://ftpuser:[email Protected]/record
root# Ll/home/ftpuser/record view upload files and folders Group User rights meet RW
8, Recycling ftpuser User login rights
root# usermod-s/sbin/nologin Ftpuser
root# Su-ftpuser login Prompt is not logged in
This account was currently not available.
9, the FTP service is still able to access the normal
Ftp://ftpuser:[email Protected]/record

FTP new upload file server other ordinary users no read and write permission issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.