LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-26-2017, 07:11 AM   #1
taru.tarak
Member
 
Registered: Aug 2016
Distribution: CentOS
Posts: 60

Rep: Reputation: Disabled
Post Add new FTP user & give him specific folder permission only on AWS EC2


We are using AWS EC2 service with CentOS6.

I want to add a new user for a specific folder only like /var/www/html so that he can access that folder only via FTP (FileZilla).

I can not give him root user login which I have. He should not access other folders.

Is there any easy way to add new user or I must have to go for VSFTPD service. Can anybody help me?
 
Old 04-26-2017, 10:46 AM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
FileZilla supports SFTP, so I'd advise that over the high insecure FTP. As SFTP is served by the SSH Daemon, then you'll already have it installed (assuming you are using SSH to connect to the server). You would just need to set-up the user permissions then and a chroot jail to achieve what you are after. Unfortunately chroot jails can be problematic to set-up, so I'd follow a good guide on how to do it. VSFTPD does also support chroot jailing if you want to stick with FTP or go for FTPS. You would also need to ensure that the server is configured to have no login shell so that they can not use ssh.
 
Old 04-26-2017, 12:46 PM   #3
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 4,109
Blog Entries: 3

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
Yes, please forget FTP. You have SFTP already if you are connecting with SSH. With SFTP, what you ask can be done in two phases:

One step is to get the directory ready for multiple users.

The other step is to lock the one user into an SFTP chroot. For that you'll need to familiarize yourself with several directives from the manual page:

Code:
man sshd_config
In particular look up each of these:

Code:
Subsystem sftp internal-sftp

Match Group webmasters
        ChrootDirectory /var/www/html/
        AllowTCPForwarding no
        X11Forwarding no
        ForceCommand internal-sftp
Which version of openssh-server are you running?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create an FTP user with permission to access only one specific directory guhan.p Linux - Server 1 08-07-2014 10:56 AM
How to give read-only permission for specific user for specific folder in RedHat digitalbiopharm Linux - Newbie 15 12-28-2013 03:12 PM
Change the permission of the folder or file for a specific user it-secret Linux - Newbie 3 08-14-2012 01:38 AM
how to give access to particulat user in ftp user group to particular folder marora Linux - General 2 06-16-2011 02:03 AM
can i give directory permission to a group and not specific user? SamuraiCoder Linux - Newbie 5 05-26-2010 04:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration