SFTP user creation without SSH
I need to create a user who can login using sftp and refuse login with ssh. When logged in using sftp, the access directory should be /var/www/html but the user must not be able to go backwards ie from html to www and so on. Also the user must be able to upload contents to html folder directly.
My Current status I have created the user and have configured ssh so that the user gets only sftp access and the access directory is /var/www/html and the user can't move backwards. Until this i have referred various sites to work out. But now am finding it difficult to configure the upload permissions. I hope some one can give me a fair idea. |
use adduser <username >
or use useradd <username > |
Why don't you install ftp?
It fulfills your all requirements. |
have a read of chroot, make /var/www/html the root dir for the user, then they cannot go backwards.
|
So, everything is working except
Quote:
|
Quote:
|
1. Just set the login to the chroot dir.
2. Please give example (not description) of upload/perms issue ie show entire session. Try Code:
ls -l |
Quote:
drwxr-xr-x. 5 pop test 4096 May 25 11:07 /var/www/html/ ls -ld /var/www/ drwxrwx--x. 7 root root 4096 May 21 15:28 /var/www/ Everything is working fine except uploading contents to html folder and the direct access to html folder when logging in. |
All times are GMT -5. The time now is 11:30 AM. |