Sorry we lost some posts because of database errors!

*New 12.1 series Release:
2020-09-01: XigmaNAS 12.1.0.4.7728 - released

*New 11.4 series Release:
2020-08-27: XigmaNAS 11.4.0.4.7718 - released!


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

Restrict user to a folder on SFTP

Authenticating users & groups on XigmaNAS.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
igr4free
experienced User
experienced User
Posts: 97
Joined: 19 Dec 2016 15:12
Status: Offline

Restrict user to a folder on SFTP

#1

Post by igr4free »

Hello,

I want to block a user so that he can only access a folder and its subfolders, allowing access by sftp. I just want to allow SFTP access.

In the user configuration I have allowed the SH console. Its primary group is "homeusers" and it is also included in the sshd group. This user has a homedirectory configured, but it is not the one I want to allow. I want to give you access to a "Media" folder belonging to root: homeusers (drwxrwxr-x).

In the SSH configuration I have added:

Match user Zorca
ChrootDirectory /mnt/iNASpool/Datos/Zorca
ForceCommand internal-sftp
PermitTunnel no
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no

Log entry--> sshd: fatal: bad ownership or modes for chroot directory component "/mnt/iNASmedia/Media/"

can you help me? thanks!
XigmaNAS 12.1.0.4.7542 released (FreeBSD 12.1-RELEASE-P3) RootOnZFS (mirror disk)
HPE Proliant Microserver Gen8 / CPU: E3-1265L V2 @ 2.50GHz / Mem: 16GB DDR3 ECC / Storage: IBM ServerRaid m1015, 4x 1TB HITACHI RaidZ1, 2x 1TB HITACHI Stripe, OS Disk: 2x 80GB INTEL SSD

igr4free
experienced User
experienced User
Posts: 97
Joined: 19 Dec 2016 15:12
Status: Offline

Re: Restrict user to a folder on SFTP

#2

Post by igr4free »

Hi,

resolved! :)

I was wrong assigning permissions on the Media folder. 715 was configured instead of 755.

Blessed "chmod Calculator";)
XigmaNAS 12.1.0.4.7542 released (FreeBSD 12.1-RELEASE-P3) RootOnZFS (mirror disk)
HPE Proliant Microserver Gen8 / CPU: E3-1265L V2 @ 2.50GHz / Mem: 16GB DDR3 ECC / Storage: IBM ServerRaid m1015, 4x 1TB HITACHI RaidZ1, 2x 1TB HITACHI Stripe, OS Disk: 2x 80GB INTEL SSD

wiseflowIII
NewUser
NewUser
Posts: 5
Joined: 03 Nov 2020 12:33
Status: Offline

Re: Restrict user to a folder on SFTP

#3

Post by wiseflowIII »

I've already read it but it doesn't solve my problem. I've already changed permissions and it still doesn't work.

Post Reply

Return to “Local Users & Groups”