Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
The Server Admin
The Server Admin
  • Home
  • Linux
  • Windows
  • About
  • What Powers The Server Admin
  • Home
  • Linux
  • Windows
  • About
  • What Powers The Server Admin
Close

Search

  • https://www.facebook.com/
  • https://twitter.com/
  • https://t.me/
  • https://www.instagram.com/
  • https://youtube.com/
Subscribe
Linux

How to restrict sftp user to read-only access

By Anthony
January 11, 2026 1 Min Read
0

There are some times that one needs to setup a read-only user to your SSH/sFTP host. To do that lets first login via SSH to your vps/server.

Once connected all we need to do is edit one file, the /etc/ssh/sshd_config ** Follow my initial setup here.

Once the above is done, lets take that user you created and set the user to read only. To do that we just add two lines to our config file.

An sftp user or group can be restricted to read-only access by using the “internal-sftp -R” option.
After a successful configuration, the sftp user or group will only have read-only access.

Here is an example of an entry in sshd_config file to restrict “user1” to read-only access for sftp:

Match User user1
  ForceCommand internal-sftp -R

Here is an example of an entry in sshd_config file to restrict “testgrp” to read-only access for sftp:

Match Group testgrp
  ForceCommand internal-sftp -R
Author

Anthony

Follow Me
Other Articles
Previous

Install Docker

Next

Rsync Command Examples

Search

Need a Virtual Server for sysctl testing? Check out our plans!

Popular Posts

  • Mount sFTP folder as local drive
    by Anthony
    June 9, 2026
  • Robocopy Examples
    by Anthony
    February 12, 2026
  • Rsync Command Examples
    by Anthony
    February 10, 2026

Trending

  • Mount sFTP folder as local drive
    by Anthony
    June 9, 2026
  • Adding a GUI to a Server or VPS
    by Anthony
    August 27, 2024
  • Back up to a shared folder with Time Machine on Mac
    by Anthony
    January 4, 2025
  • Backup Your Databases
    by Anthony
    March 24, 2024

Editors Picks

    Send an email:
    mail@example.com

    Call me:
    123-456-7890

    • Facebook
    • Twitter
    • Instagram
    • TikTok
    • LinkedIn
    • Behance
    Copyright 2026 — The Server Admin. All rights reserved. Blogsy WordPress Theme