• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Best way to add sftp user to be jailed within an existing host

Paul Larson

Basic Pleskian
Server operating system version
Ubuntu 22.04.4 LTS
Plesk version and microupdate number
Obsidian Version 18.0.62 Update #2, last updated on July 29, 2024 11:19 PM
There are numerous threads that cover this issue, many I've read, but I can't seem to master this workflow.

  • A domain exists, example.com, with user: example
  • A directory exists, /var/www/vhosts/example.com/upload
  • I'd like an sftp user (not ftp) jailed to /var/www/vhosts/example.com/upload
FTP is not an option for the client. FTP or over TLS not an option.

I've solved this in the past, but always felt I'm over-working something. My norm has been:

  • Create completely separate ssh user (as root user, not in Plesk)
  • Create group (usermod command), such as my-group, where 'example' and 'additional_user' are members
  • Set directory ownership of /var/www/vhost/example.com/upload to example:my-group
  • Then, the ssh user additonal_user can navigate to this 'upload' directory and upload files - but they can also navigate the rest of the web property
Paul
 
I can't really think of any another way than what you've described already. Which is not to say there isn't any other way to accomplice, but to me your approche makes sense :)
 
Back
Top