Hi, I cant login sftp if I Chrooted user(abc) to write privileged directory (/home/abc/abc.com) but I can login if I Chrooted directory (/home/abc/abc.com) is only readable privilege to user(abc) or user group (abcgrp)
I want to give write access for specific chrooted folder (/home/abc/abc.com) and with user could login to sftp. How?
thanks for your help.
my sshd_config is:
Match Group abcgrp ChrootDirectory /home/abc/abc.com ForceCommand internal-sftp X11Forwarding no AllowTcpForwarding no
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I am guessing that you created the abc.com directory as an administrative user and not the user abc?
If so, you need to give the abc user permission to the folder you created as an administrator. Use this command to do that:
chown -R abc:abcgrp /home/abc/abc.com
Take a look at How can I chroot sftp-only SSH users into their homes? - Ask Ubuntu. In order to chroot abc to /home/abc/abc.com, you need to have /home/abc/abc.com writable only by root and grant them write privileges to a subdirectory, e.g. /home/abc/abc.com/files.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.