How to apply the different access permission to a directory between ssh an sftp access with the same user.
Issue
- I wanted to apply the different directory access between the
ssh
access and thesftp
one with the same user. - For example:
- A user has
/private
and/public
directories in the home directory. - On
ssh
session, I want to allow the user to access (read/write) to the both directories. - On
sftp
session, I want to allow the user to access to the/public
directory, but not to the/private
directory.
- A user has
Environment
Red Hat Enterprise Linux 7 (RHEL7)
Red Hat Enterprise Linux 8 (RHEL8)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.