The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Pure-ftpd.conf overwrited with stock configuration

Discussion in 'General Discussion' started by ntk, May 31, 2010.

  1. ntk

    ntk Member

    Joined:
    Jun 16, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hello
    I have changed few times one of the options (LimitRecursion 2000 8) in /etc/pure-ftpd.conf. On next day the I see that pure-ftpd.conf is overwrited with stock configuration. What to do in order my changes to not be overwrited by cpanel update process.
    Is this a bug ? Any ideas how this can be resolved ?
    Is this overwrite of pureftpd.conf common problem ?
    Regards
    Nikolay Kabaivanov
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Pure-ftpd configuration should not get overwritten unless an update was carried out automatically. BTW, what you can do is, set an attribute to the pure-ftpd configuration file. Make the changes you wish to in the configuration file and set the attribute using the chattr command
    Code:
    chattr +i /etc/pure-ftpd.conf
    This will make sure the file does not get overwritten unless you remove the attribute manually by executing
    Code:
    chattr -i /etc/pure-ftpd.conf
     
  3. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Hi there -

    I have encountered the same issue, apparently every time pureftp is updated presumably as part of a cpanel regular update.

    The strange thing is that my comments are preserved in the .conf file, but the modified LimitRecursion directive is not.

    What is the consequence of using the above prescribed remedy? I am assuming that if the update is updating settings in the pureftp.conf file, then they are essentially part of the update.

    It would be better if cpanel could code this in similar to the way they've done to preserve custom apache and/or php configurations/directives.

    It already looks as if the update is selectively overwriting some things but not others in the .conf file, so it should be a simple matter for cpanel to code such that it does not overwrite anything other than what is necessary.

    Thanks.

    Mike
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    It isn't recommended to chattr +i files, since this does indeed prevent updates. The file that determines some of the settings in /etc/pure-ftpd.conf file is this one:

    Code:
    /var/cpanel/conf/pureftpd/main
    You can simply edit that file for the LimitRecursion line, then go to WHM > FTP Server Configuration and save that area, which pushes the changes to /etc/pure-ftpd.conf file. Since the file is built from that main one for the template configuration, this will change it to the new entry for /etc/pure-ftpd.conf

    I did test running /scripts/upcp --force and /scripts/ftpup --force to ensure the changes made to main file didn't get overwritten on updates, and it wasn't changed.
     
  5. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Ah! Very nice!

    Okay - so once again, you guys continue to impress and have covered just about everything, but the weakness is in building out the functionality cleanly into WHM and basically overall awareness. And, I think the awareness part again puts the pressure on the importance of continuing to improve WHM so things are well-organized and comprehensive.

    For example, if everything is so neatly in /var/cpanel/conf for various services, you might simply want to have a tab in whm that offers editing of each of these, rather than having everything scattered. At the same time, things should be linked together functionally - currently there are many different places to configure different bits and pieces of things. Breaking things down functionally would really help.

    So, a section with everything needed for FTP, one for PHP, etc.

    There's too much searching around right now and even experienced users still have to hunt for things we know are in there somewhere.

    That all being said, I have noticed recent improvements to WHM.

    And most importantly, I can never express enough how much I appreciate the level of support you guys provide. I really appreciate the quick and thorough answers I've received here as well as those I've always received consistently via ticket support.

    Thanks!

    Mike
     
  6. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Edit: I should have refreshed my browser tab as I missed the detailed reply by cPanelTristan; what he posted is absolutely correct in that customizations for Pure-FTPd may be applied to the YAML file at "/var/cpanel/conf/pureftpd/main" to ensure they are retained throughout future updates. :)

    Does the option being customized exist in the following YAML file?
    Code:
    /var/cpanel/conf/pureftpd/main
    Example commands to help determine the above:
    Code:
    # cat /var/cpanel/conf/pureftpd/main
    # grep -Hin "LimitRecursion" /var/cpanel/conf/pureftpd/main
    If it does exist, please try adjusting it to the same values that you are needing (where it matches your customization in "/etc/pure-ftpd.conf"), then wait to see if the directive stored in "/etc/pure-ftpd.conf" is reverted as previously experienced. If the difficulty persists, please consider submitting a support request so that we may assist with further investigation; if a support request is submitted please reply back with or send me a PM with the ticket ID number so that we may follow-up internally.

    I do not recommend setting the immutable attribute on any configuration files and especially those of services handled by cPanel & WHM. Using the immutable attribute has the potential to severely break updates and or cause unintended side effects, such as keeping a deprecated revision of a file that is no longer compatible with other components.
     
    #6 cPanelDon, Nov 3, 2010
    Last edited: Nov 3, 2010
  7. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Wasn't this sufficiently addressed above by Tristan?

    I'm not clear on what you are recommending against.
     
  8. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    The procedure Tristan prescribed works perfectly. You ought to consider adding directives such as LimitRecursion into WHM -> FTP Server Configuration.

    What I am also suggesting is that functionality is currently scattered. So, it would be beneficial to work toward consolidating.

    In this case, FTP Server Selection and FTP Server Configuration could easily be coded nicely to share the same tab in WHM. Greater simplicity makes the product easier to navigate, thus making an admin's job simpler and more efficient - and most importantly, less stressful :)

    Thanks.

    Mike
     
  9. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    My apologies; please see the edit to my post after I realized cPanelTristan already responded in detail.

    I was referring specifically to use of the immutable attribute (or "bit") that was mentioned by madaboutlinux. To help reduce confusion I have inserted a quote of the message I was intending to reply to in the latter part of my message; thank you for bringing this to attention.
     
  10. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Yes - of course Don - I'm not interested in the chattr band-aid fix previously mentioned, that will ultimately result in heavy bleeding :D

    Again - I believe Tristan covered that one as well.

    Thanks for all of your help.

    mrk
     
Loading...

Share This Page