SSH does not work with users' home set to 750

Dear all,

to begin I'd like to clarify that I am not a professional, I am just passionate about it, and I am doing all of this for hobby and fun!

On my pet VPS to prevent people lurking in the other home directories I setup each users <homedir> with permissions 750, unfortunately this prevented some authorized users (included myself) to SSH into the server. Eventually to reinstate SSH I had to revert the permissions to 755.

Did I use wrong permissions? Is there any particular setup that I have to specify into sshd_conf?

Thanks in advance,

F.
 
It's not the 0750 permissions on the home directory. That works just fine.

Code:
root@fbsd-test:/home # ls -al
total 24
drwxr-xr-x   3 root  wheel  512 Dec 27  2020 .
drwxr-xr-x  16 root  wheel  512 Apr 19  2021 ..
drwxr-x---   4 dice  dice   512 Jun 13 17:46 dice
Code:
dice@maelcum:~ % ssh fbsd-test
(dice@fbsd-test.dicelan.home) Password for dice@fbsd-test.dicelan.home:
Last login: Mon Jun 13 17:46:44 2022 from maelcum.dicelan.home
FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC

Welcome to FreeBSD!
...
 
Ok... The curse of Pebkac... ?

I changed the permit again at 750 and to be sure rebooted the VPS and now it works... ?‍♂️

Code:
drwxr-xr-x   4 root    wheel   512 Jun 10 15:55 .
drwxr-xr-x  15 root    wheel   512 May 25 18:26 ..
drwxr-x---   6 freezr  freezr   512 Jun  5 02:04 freezr
 
How did you change those permissions? Did you do a chmod -R 750 <homedir>? Because that would set everything to 750 in the directory too. This would also mark plain files as executables. Usually not what you want happening.
 
Ok to be honest... I tried to access from my OpenBSD machine and with permissions set to 750 I couldn't, while now I tried to access from FreeBSD...

Maybe the issue is within OpenBSD... ?
 
How did you change those permissions? Did you do a chmod -R 750 <homedir>? Because that would set everything to 750 in the directory too. This would also mark plain files as executables. Usually not what you want happening.

I did chmod 750 user_homedir but now I think it is an issue that belong to OpenBSD... ?
 
Back
Top