It looks like you are asking if this is possible and how to change / configure permissions on a Solaris machine.
The steps shown here may vary depending on your version of Solaris and the specific options that your environment has.
These steps are provided without any guarantees, and you should never follow the security tips or the steps βblindlyβ on how to configure the security of the system for which you are responsible, just because you found the answer online (even in a stack overflow), make sure you understand and test every single line shown here before applying it to the production system
On the server side, depending on your version of Solaris, you need to follow these steps.
This procedure sets up the sftponly directory, created specifically for sftp submission . Users cannot see files or directories outside the transfer directory.
All actions are performed with the root role ..
On the Secure Shell server, create an isolated directory as a chroot environment.
# groupadd sftp
In this configuration, / export / home / sftonly is the chroot directory that only the root account has access to. The user has permission to write to the sftponly / www subdirectory.
On the server, configure the matching block for the sftp group.
In the / etc / ssh / sshd _config file, find the sftp subsystem entry and modify the file as follows:
# pfedit /etc/ssh/sshd_config ...
The following variables can be used to indicate the chroot path:
% h - Specifies the home directory.
% u - Specifies the username of the authenticated user.
%% - Resets the% sign.
In the client, verify that the configuration works correctly.
Files in your chroot environment may vary.
root@client :~
This was taken from this document.
https://docs.oracle.com/cd/E36784_01/html/E37125/sshuser-18.html