Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    vsftpd deny_file - how to exclude the characters '?' and '*'


    Hi,

    I am running vsftpd on Solaris 10. We disallow several things from file names: leading dash and the chars [space] [tab] ; ` # $ & * ? ( ) [ ] | < > ' " \

    In my vsftpd.conf I have
    deny_file={-*,* *,* *,*;*,*`*,*#*,*$*,*&*,*(*,*)*,*[*,*]*,*|*,*<*,*>*,*'*,*"*,*\*}

    This is fine for all the characters except '*' and '?'

    Unlike most regexp constructs, the \ character is not an escape. I've read the source code and it looks like it is not possible to include the characters '?', '*', and '{' in deny_file.

    Has anyone been able to do this? Thanks.

    Bruce McFarland
    First Data Corp.
    Houston, TX

  2. #2

    Test this option

    Try this one:
    deny_file={* *,* *,*;*,*`*,*#*,*$*,*&*,*(*,*)*,*[*,*]*,*|*,*<*,*>*,*'*,*"*,*\*,*:*,???,??}

    This will block '*' and '?'



    Quote Originally Posted by firstdata View Post
    Hi,

    I am running vsftpd on Solaris 10. We disallow several things from file names: leading dash and the chars [space] [tab] ; ` # $ & * ? ( ) [ ] | < > ' " \

    In my vsftpd.conf I have
    deny_file={-*,* *,* *,*;*,*`*,*#*,*$*,*&*,*(*,*)*,*[*,*]*,*|*,*<*,*>*,*'*,*"*,*\*}

    This is fine for all the characters except '*' and '?'

    Unlike most regexp constructs, the \ character is not an escape. I've read the source code and it looks like it is not possible to include the characters '?', '*', and '{' in deny_file.

    Has anyone been able to do this? Thanks.

    Bruce McFarland
    First Data Corp.
    Houston, TX

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •