hi @Tej-Singh-Rana @Inderpreet @vijin.palazhi @kodekloud-support3 @andrzej @peterwhite
as per install and configure sftp task:
I am verifying my results. can you please check and advise.
if all steps are completed correctly. thank you
thank you, was able to complete the task successfully.
can you please guide me the steps literally i am stuck in the chown command kindly help @Inderpreet @swaroopcs88 @Tej-Singh-Rana
can you paste your screenshot of what steps you are stuck with?
thanks
first i created the user jim by commad
useradd -d /var/www/nfsshare -s /sbin/nologin jim
then i set password for jim
passwd jim
then i make a directory
mkdir -p /var/www/nfsshare
then i install sshd service
yum install ssshd*
then i go to vim /etc/ssh/sshd_config file and i edit the lines and shared in the screenshot once done i am not able to restart sshd service and i dont know what all i have missed
kindly help
what all the steps i have missed please tell me
kindly hep @swaroopcs88 @Tej-Singh-Rana @Inderpreet
Hi Karthik,
Could you follow this article and let me know if you are stuck at any point.
I was able to complete the task using this article. ping me for any help.
Thanks
Swaroop
sudo systemctl restart sshd.service
try this command.
i am creating useradd -s command i dont have any idea reguarding /bin/false so is it necessary to create user in /bin/false?
thanks
hi @swaroopcs88
i have got this connection closed is the result is correct?
i was supposed to do sftp right
First of all you cannot connect this server with Filezilla. It’s a private server.
Do sudo journalctl -xe
and share that error output.
You get this because the home directory for the user or the ChrootDirectory or chain of folders leading down to it must be owned by root.
Permissions requirements:
Note that the owner of the destination directory must be “root”, and group/other users cannot have write permissions. The same with all the directory path:
Code:
chown root /path/to/destination
chown root /path/to
chown root /path
chmod g-w,o-w /path/to/destination
chmod g-w,o-w /path/to
chmod g-w,o-w /path
The description and validation on this task seem incorrect/incomplete.
Setting root:root
ownership and 755
permissions on /var/www/<folder>
does not allow sftp uploading, which seems like a reasonable use case. The question does not define whether uploading and or downloading is a requirement. I attempted this task 3 times and only passed when I used the strict download-only permissions.
I would recommend stating that /var/www/<folder>
should not allow uploads but that /var/www/<folder>/uploads
should allow uploads for the one user.
Honestly it would also be better to set this up requiring the use of groups (instead of just one user), which is a very common use case, and is cleaner in /etc/ssh/sshd_config
since you don’t have to define every single sftp user.