Proftpd开头的文件如何隐藏?ProFTPD是个Unix平台上或是类Unix平台上(如Linux, FreeBSD...)的FTP服务器程序。它是在自由软件基金会的版权声明(GPL)之下开发 发布的免费软件。也可以说,只要任何人遵守GPL版权的声明,全都可以随意修改源始码。本文讲述的是Proftpd开头的文件如何隐藏。
使用HideFiles参数进行配制就可以了。
- HideFiles
- Name
- HideFiles -- Enable hiding of files based on regular expressions
- Synopsis
- HideFiles [ [!]regexp|"none" ["user"|"group"|"class" expression]]
- DefaultNone
- Context, .ftpaccess
- Modulemod_core
- Compatibility1.2.7rc1 and later
- Description
例如:
- # Hide configuration and passwd files from view
- HideFiles "(\\.conf|passwd)$"
- # ...or the same regex, without the quotes
- HideFiles (\.conf|passwd)$
- # Hide those same files from everyone _except_ a special user
- HideFiles (\.conf|passwd)$ user !tj
- # Using the ! prefix to "invert" the regular expression matching,
- # allow only .txt and .html files to be seen
- HideFiles !(\.txt|\.html)$
- # Only let users of the webmaster group see HTML files, but nothing else
- HideFiles !(\.htm|\.html)$ group webmasterSee Also: HideGroup, HideUser, HideNoAccess
另外,打开/etc/proftpd.conf进行编辑,在里面加入:
ListOptions "." strict
【编辑推荐】