Coder Social home page Coder Social logo

puppet-vsftpd's Introduction

puppet-vsftpd

Overview

This module enables and configures a vsftpd FTP server instance.

  • vsftpd : Enable and configure the vsftpd FTP server

Examples

With all of the module's default settings :

include vsftpd

Tweaking a few settings (have a look at manifests/init.pp to know which directives are supported as parameters) :

class { 'vsftpd':
  anonymous_enable  => 'NO',
  write_enable      => 'YES',
  ftpd_banner       => 'Marmotte FTP Server',
  chroot_local_user => 'YES',
}

For any directives which aren't directly supported by the module, use the additional directives hash parameter :

class { 'vsftpd':
  ftpd_banner => 'ASCII FTP Server',
  directives  => {
    'ascii_download_enable' => 'YES',
    'ascii_upload_enable'   => 'YES',
  },
}

And if you really know what you are doing, you can use your own template or start with an empty one which is provided (see vsftpd.conf(5)) in order to have all configuration passed in the directives hash :

class { 'vsftpd':
  template   => 'vsftpd/empty.conf.erb',
  directives => {
    'ftpd_banner'        => 'Upload FTP Server',
    'listen'             => 'YES',
    'tcp_wrappers'       => 'YES',
    'anon_upload_enable' => 'YES',
    'dirlist_enable'     => 'NO',
    'download_enable'    => 'NO',
  },
}

puppet-vsftpd's People

Contributors

ghola avatar thias avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

puppet-vsftpd's Issues

Not working on Ubuntu Precise

Hey Matthias,

in short: Ubuntu (tested in Precise) uses smbd as the Samba service name. In manifests/params.pp it is set as: samba resulting in puppet not being able to restart the service (unknown service error). I've edited:

case $osfamily {
    'RedHat': { $service = [ 'smb', 'nmb' ] }
    'Debian': { $service = [ 'samba' ] }
     default: { $service = [ 'samba' ] }
  }

to:

case $osfamily {
    'RedHat': { $service = [ 'smb', 'nmb' ] }
    'Debian': { $service = [ 'smbd' ] }
     default: { $service = [ 'smbd' ] }
  }

and it worked. Note that I was too lazy to check, whether I should change only the 'Debian' or both 'Debian' and default - I just changed both. Note that on Debian the service is named: samba, so it looks like there should be another key ubuntu specifically for this issue.

Cheers,
d-ph

Update module on PuppetForge

Since Debian/Ubuntu support was added a couple of days ago it would be nice if the version on PuppetForge could be updated.

A need for the `local_root` vsftpd.conf option in `class vsftpd`

Hey mate,

thanks for making this puppet module, but let's get straight to the point:

I miss local_root vsftpd.conf option in your class vsftpd. I've managed to add it by appending

  $local_root              = undef

to your class vsftpd in \modules\vsftpd\manifests\init.pp, and by appending

<% if @local_root -%>
local_root=<%= @local_root %>
<% end -%>

to file \modules\vsftpd\templates\vsftpd.conf.erb. After that I could use

class { 'vsftpd':
  # (...)
  local_root        => '/var/www',
}

in my /manifests/default.pp.

But if you ask me, the problem doesn't really lies in the fact, that "oh boy, I need option ABC, but it's not there". I think the problem lies in the way, you're trying to manage the options. Simply speaking, I would store such "highly mutable" data in a hash map, rather than trying to manage it by hand. Can you see how awful it is to add a new option? I needed to edit two different places to add just one option. And there's still more. I like the way puphpet::ini handles the problem (by an array):

puphpet::ini { 'xdebug':
  value   => [
    'xdebug.default_enable = 1',
    'xdebug.remote_autostart = 0',
    'xdebug.remote_connect_back = 1',
    'xdebug.remote_enable = 1',
    'xdebug.remote_handler = "dbgp"',
    'xdebug.remote_port = 9000',
    'xdebug.max_nesting_level = 250'
  ],
  ini     => '/etc/php5/apache2/conf.d/zzz_xdebug.ini',
  notify  => Service['apache'],
  require => Class['php'],
}

This way they covered all the xdebug options existing now and in the future.

I'm far from telling you how to code. At least I'm trying not to. In fact I don't even know how to program in Ruby, so you're my hero from the beginning. Just think about it, especially because your puppet module is #1 in the download count ("ftp" query) on the puppet forge, so more users may also have similar problem.

Or maybe there is a different way to add an arbitrary option to the vsftpd.conf through thias/puppet-vsftpd?

Kthxbb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.