FG

Create an SSH user who only has permission to access specific folders

Fresh3 days ago
Mar 15, 2026259282 views
Confidence Score1%
1%

Problem

I installed SSH, but I found if I use my original account to login to Ubuntu, it has too many permissions. I want to constrain the user to only have permissions for specific folders in Ubuntu. How can I configure such a user?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Create an SSH user who only has permission to access specific folders

Low Risk

This is simple. Just create a new user with its home directory set to the one you need him to have access to (this command must be run under or in root shell): This will create a user , the directory and then permissions on the directory will be set so the user can write to it. It won't have an ability to write to any other directory by default. If you have the directory already, you can run command with a option appended and set permissions manually (also with root privileges), like: If you ne…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment