LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-02-2015, 03:23 PM   #1
jokerRHEL
LQ Newbie
 
Registered: Oct 2015
Posts: 3

Rep: Reputation: Disabled
Need to hide .* files with regular stement in vsftpd.conf


hi everyone
there is this particular problem i couldn't resolve in my ftp server configuration:
these particular files .* (e.g. .bash_history,.<something>) that suppose to be hidden by default but they are not. Im trying to solve this as simple as possible through a regular statement such as {.*} in the hide_file option in vsftpd.conf but instead it hides everything. Apparently this is no longer useful since vsftpd 2.2.2 according to every documentation i have read.
If anyone could bring a hint it would be appreciated

Last edited by jokerRHEL; 11-02-2015 at 03:26 PM.
 
Old 11-03-2015, 09:57 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,447

Rep: Reputation: Disabled
According to a quick Google search, hide_file={*.} used to work, although it really shouldn't have. It worked because vsftpd only implements (or at least used to implement) a very limited subset of the regular expression syntax.

If interpreted as a proper regular expression, ".*" means "any single character [the dot], followed by anything [the asterisk]", which would indeed match any file name. Since that's the effect you're currently seeing, perhaps the vsftpd RegEx engine has been fixed?

A proper regular expression matching a dot at the beginning of the string followed by any number of characters, would look like this:
Code:
^\.*
The caret/circumflex ("hat") matches the beginning of the line, while the backslash escapes the dot, causing it to be interpreted as a literal character rather than a RegEx for "any single character".

You could give it a try and see what happens.

Last edited by Ser Olmy; 11-03-2015 at 10:03 AM.
 
Old 11-03-2015, 12:49 PM   #3
jokerRHEL
LQ Newbie
 
Registered: Oct 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thumbs up

thanks Olmy it did work
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
a parameter in vsftpd conf file without which vsftpd server will not work James0806 Linux - Newbie 1 09-24-2014 12:37 PM
default /etc/vsftpd/vsftpd.conf content rpmacaspac Linux - Newbie 1 09-04-2013 01:29 AM
[SOLVED] hide hidden files (.kde .bash etc) to end user in vsftpd prayag_pjs Linux - Newbie 2 09-09-2010 03:44 AM
vsftpd.conf/chroot/vsftpd.chroot_list issue Jerman Linux - Security 2 06-01-2007 07:24 PM
vsftpd won't read vsftpd.conf m2azer Linux - Software 9 04-21-2006 03:25 PM


All times are GMT -5. The time now is 11:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration