How to apply the different access permission to a directory between ssh an sftp access with the same user.

Solution Unverified - Updated -

Issue

  • I wanted to apply the different directory access between the ssh access and the sftp 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.

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content