I am implementing a FTP server in Linux. I use chroot commmand to change the currenty working directory when users send CWD command. But then I cannot use “ls -l” command to get file list information any more.
Is there any way to get file information in this situation?
I am implementing a FTP server in Linux. I use chroot commmand to change
Share
chrootis not meant to change the current directory. You should usechdirfor that.(
chrootchanges the root filesystem. Therefore, after achrootto a user directory, it is most likely that you cannot find/bin/lsanymore in this new root filesystem.)