PDA

View Full Version : ftpd and hiding . files


crofox
06-25-2008, 12:07 AM
Hello all, thanks for any help! I got my base 4.2 install, configure ftpd with chroot, created a test user, all is good. However, when I use filezilla to connect, it shows the .cshrc .login .mailrc and the .profile files. Is there a way to hide these? I know I can remove them, and the user account still works, but ideally, I'd like to try to hide them. Thanks in advance for any advice! Much appreciated.

jggimi
06-25-2008, 12:47 AM
The ftpd(8) server responds to LIST commands with "ls -lgA". See src/libexec/ftpd/ftpcmd.y

crofox
06-25-2008, 11:41 PM
Ahh, thank you! I forgot about the commands. I looked at my server and I don't seem to have that file in that directory. Any other ideas? Thank you!

BSDfan666
06-26-2008, 12:38 AM
It would appear that you don't have the source installed in /usr/src then, or if you do, were unable to interpret the relative path jggimi gave you. :rolleyes:

ocicat
06-26-2008, 12:54 AM
It would appear that you don't have the source installed in /usr/src...
"Pre-loading" the source tree is discussed in Section 5.3.3 of the FAQ:

http://openbsd.org/faq/faq5.html#BldGetSrc

src.tar.gz can be found on the 4.3-release CD's, downloaded from a mirror, or installed via CVS.

jggimi
06-26-2008, 04:01 AM
If you are interested in modifying ftpd yourself, you can do so. To build it, assuming your source tree is in /usr/src:

# cd /usr/src/libexec/ftpd
<make all the customizations you want>
# make obj && make && make install
<restart ftpd, confirm that your modifications are working>
# rm -rf obj