0

I'm quite new to Linux, I'm running CentOS 6.7 and I'm trying to follow best practice procedure of creating a user "instead of using root" but I want to restrict their SSH file browsing capability to their home directory.

I've got vsftpd running and it works fine for FTP, and when I log on as the user via SSH it defaults to their home directory but they can then just "cd /" and go where they want.

I realize vsftpd is a separate entity but there was an option I turned on there too lock users to their home directories, can I do this within the command line too?

I also don't want the user to have permissions to run sudo commands, so perhaps there's a permission level I should assign to the account?

Apologies if this is a simple question but I couldn't find an answer Googling, (I was probably wording it poorly).

0

I've got vsftpd running and it works fine for FTP, and when I log on as the user via SSH it defaults to their home directory but they can then just "cd /" and go where they want.

Yes. SSH is shortcut of Secure Shell. After authentication you have the same access as if you were sitting next to the computer and were typing into the terminal.

I realize vsftpd is a separate entity but there was an option I turned on there too lock users to their home directories, can I do this within the command line too?

Yes. It is called chroot and you find quite much information about it in manual pages for chroot and for sshd_config, which is good place to start if you want to configure something.

I also don't want the user to have permissions to run sudo commands, so perhaps there's a permission level I should assign to the account?

Whoever can run sudo, if use can access this executable. But the thing you want is that the user will be rejected, unlike you. This is configured in sudoers (again, see manual pages or configuration file in /etc/).

Apologies if this is a simple question but I couldn't find an answer Googling, (I was probably wording it poorly).

I hope you will be able to find some info to set up these tools for you. There are many questions even on stackexchange, about these topics.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.