PDA

View Full Version : How to hide those hidden files?


rosa hsiao
21st December 2005, 03:17
When login FTP server,there are many hidden files which I don't want to be displayed in the file list. What should I do?

benbalbo
21st December 2005, 07:18
Checkout the proftpd configuration options (http://chronos.cs.msu.su/proftpd/Configuration.html). the "IgnoreHidden" option might offer what you're after.

Edit: note that you might want users to get to dot files - like the .ht(access|passwd) files for example.

rosa hsiao
21st December 2005, 09:55
Checkout the proftpd configuration options (http://chronos.cs.msu.su/proftpd/Configuration.html). the "IgnoreHidden" option might offer what you're after.

Edit: note that you might want users to get to dot files - like the .ht(access|passwd) files for example.

There are two files under /etc directory:
proftpd.conf
proftpd_ispconfig.conf

And I can't find any option regarding "IgnoreHidden" in both files. Should I add the option "IgnoreHidden on" manually? Where should I add the option?
I am using FC3+Proftp+ISPConfig 2.1.2.

till
21st December 2005, 10:42
Yes, you must add the line to /etc/proftpd.conf

rosa hsiao
21st December 2005, 11:31
Yes, you must add the line to /etc/proftpd.conf

I add the following line to /etc/proftpd.conf under:

Default ~
IgnoreHidden on

Then I restart proftpd,but it display the following error message:

warning: AuthPAMAuthoritative is drprecated.
Fatal: Proftpd directive not allowed in server config context on line 141 in /etc/proftpd.conf.

What else do I miss?

falko
21st December 2005, 11:59
This seems to be a different error that has nothing to do with the lines you put into /etc/proftpd.conf.

What's in line 141 of your proftpd.conf?

rosa hsiao
21st December 2005, 13:01
This seems to be a different error that has nothing to do with the lines you put into /etc/proftpd.conf.

What's in line 141 of your proftpd.conf?

The 141 line I put into /etc/proftpd.conf is:

DefaultRoot ~ <==line 140
IgnoreHidden on <==line 141


Please see the attached images

till
21st December 2005, 14:12
Which options do you have in the LsDefaultOptions configuration directive in your proftpd.conf ?

rosa hsiao
22nd December 2005, 03:37
Which options do you have in the LsDefaultOptions configuration directive in your proftpd.conf ?
There is no LsDefaultOptions in my proftpd.conf. But I find the following lines in it:

AuthPAMAuthorititive on
ListOptions "-a"

till
22nd December 2005, 13:13
Please try to set:

ListOptions ""

and restart postfix. The list options are passed to the linux command "ls", with the parameter "-a" the ls command lists also dot files.

rosa hsiao
23rd December 2005, 11:19
Please try to set:

ListOptions ""

and restart postfix. The list options are passed to the linux command "ls", with the parameter "-a" the ls command lists also dot files.

It works!

But,how to hide those directories except /web such as:
/cgi-bin
/log
/phptmp
/ssl
.
.

falko
23rd December 2005, 13:38
If you hide those directories, the admin user won't be able to upload Perl scripts or download log files...

rosa hsiao
23rd December 2005, 14:25
If you hide those directories, the admin user won't be able to upload Perl scripts or download log files...

What if the administrator accidently delete those directories?
Can't he just make any new directory name to put his perl or php scripts?

till
23rd December 2005, 14:57
All directories where it is critical when they where deleted cant be deleted by the web admin.

falko
23rd December 2005, 17:34
What if the administrator accidently delete those directories?
Can't he just make any new directory name to put his perl or php scripts?
http://www.howtoforge.com/forums/showpost.php?p=3434&postcount=5

rosa hsiao
24th December 2005, 14:24
http://www.howtoforge.com/forums/showpost.php?p=3434&postcount=5

Thanks.
Now I am able to open the FTP server to my users.
No more questions relate to this topic. I will post another question in new topic.