I have a server running Centos 6.4 and I need to allow a freelancer access to one folder on the server to upload some code and do some testing - I have set their home directory in /etc/passwd to:
username:x:505:505::/home/virtual_server/directory/home_directory/:/bin/bash
When they try and SSH in they get:
Could not chdir to home directory /home/virtual_server/directory/home_directory/: Permission denied
-bash: /home/virtual_server/directory/home_directory//.bash_profile: Permission denied
If they try and login via FTP (VSFTP where I have enabled chroot) they get an error:
Response: 500 OOPS: cannot change directory:/home/virtual_server/directory/home_directory
Error: Critical error: Could not connect to server
I found a similar question from a few years back for which the accepted answer was needing to change all directories above the home directory to have read and execute https://serverfault.com/a/435430/142823
Is there an alternative way of doing this without needing to change permissions on other directories or something a little less "permanent"?