0

I opened the access to a certain directory via SSH/FTP. Some adjustment to my web project is necessary, so I have organized an access for a programmer.

The problem is that the command "cd" is available without any limits. I mean that several "cd .." may lead up to the topmost directory. Then you can change directory to any other directory if you know the path.

The hoster answered to me that this is an ordinary behaviour of the system, but the the new users via SSH/FTP will not be able to modify or see anything outside the above mentioned directory.

Could you help me understand whether there is any risks here?

And if the risk exists, how can a hacker penetrate my security perimeter if he has the abovementioned access?

2
  • There are file system permissions for that... May 22, 2022 at 19:15
  • this question is off topic on Security SE.
    – mentallurg
    May 22, 2022 at 20:18

1 Answer 1

1

The behavior that you are describing is default behavior in most Linux systems. Users are free to navigate around the file system. If you don't want other users to have access to your files, use commands such as chown and chgrp to prevent this.

Notwithstanding, there are ways that the system admin can prevent users from navigating outside of their home directory. This is known as 'jailing' the user to their home directory, and it's typically done using the chroot command. When applied, jailed users are not able to navigate or access files outside of their home directory. See https://linuxconfig.org/jail-ssh-user-to-home-directory-on-linux for a good write-up on how this is done.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .