views:

31

answers:

2

I'm working on FTP demon 1.7 I have following questions.

  1. How can I restrict a user to one particular directory? Lets say a user logs in as "admin", he should be having access to only "/tmp" directory, nothing else.

  2. I'm going through ftpd's code and trying to modify as per my needs. Any good reference/documents to get hang of current code organization?

A: 

There are alot of ftp daemons already capable of your requested feature. I'd suggest you stick to one of those, for example pure-ftpd.

speakman
A: 

Thanks @Tim Post and @speakman

My question lacked the details. I'm using linux-ftpd-0.17 in custom made embedded systems. The only user that exists in the system is "admin" ( with root privileged) and it is required that during ftp session - the user should only have access to its home directory and not to any other directory.

This customization required changes in ftp daemon code. The changes were introduced in "cwd" , "pwd" and "retrieve" functions. Please let me know, If you need more information on what changes are made.

calvinscorner