LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   ftp hiding files and folders (https://www.linuxquestions.org/questions/%2Absd-17/ftp-hiding-files-and-folders-820125/)

sasser 07-16-2010 01:36 AM

ftp hiding files and folders
 
Following the instructions in FAQ I setup and ftp server on a machine running openbsd4.7.
Luckly it works, but I wonder about some files and folders like: .Xdefaults, .cshrc, .login, .mailrc, .profile and .ssh.

My problem is that those files apear when browsing the server, is that normal to have those files shown? I checked this on some online ftp servers and I didn't see those files.

The ls -al command in the /home/ftp shows:
Quote:

$ ls -al
total 36
dr-xr-xr-x 4 root ftp 512 Jul 16 09:34 .
drwxr-xr-x 5 root wheel 512 Jul 15 22:50 ..
-rw-r--r-- 1 ftp ftp 22 Jul 15 22:50 .Xdefaults
-rw-r--r-- 1 ftp ftp 773 Jul 15 22:50 .cshrc
-rw-r--r-- 1 ftp ftp 398 Jul 15 22:50 .login
-rw-r--r-- 1 ftp ftp 113 Jul 15 22:50 .mailrc
-rw-r--r-- 1 ftp ftp 218 Jul 15 22:50 .profile
drwx------ 2 ftp ftp 512 Jul 15 22:50 .ssh
dr-xr-xr-x 4 root ftp 512 Jul 15 23:03 pub

rastafadud 07-16-2010 06:21 AM

try:
man ls
and see what -a and -l options are

sasser 07-16-2010 09:25 AM

Quote:

Originally Posted by rastafadud (Post 4035161)
try:
man ls
and see what -a and -l options are

I know what those options means, I posted that result to see the files and their permissions.

My question was about those files which appear when I browse the ftp server since I didn't see them on other online ftp servers.
I want to know if is something wrong that those files are shown when somebody browse the server and if so, how can I remove them since they should be hidden since their names starts with .

Mr-Bisquit 07-16-2010 09:22 PM

man chmod.
Set R&W to you only.
Place the ftp access in another folder, not home. Create the folder.
Code:

mkdir /ftp
chmod /ftp RO

fill in the values.

"Ftp is a service not a user." Emise Ria.

sasser 07-19-2010 02:11 AM

Quote:

Set R&W to you only.
Place the ftp access in another folder, not home.
1. "To you", means which user? Myself, root, ftp users?
2. How can I place fto access in another folder, not home?

Short comments:
All those access rights and owners are set according to latest OpenBSD FAQ. The only difference is that in my situation appear those config files (the one starting with .) and I don't know if that is normal or not.
All tutorials I've found use the same method: chroot ftp user to his home directory and allow access to that folder. A slighty tunning was to add another directory from the outside of the home directory, but even then, the root of the ftp server was the home directory of the ftp user.


All times are GMT -5. The time now is 01:35 AM.