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.

I have problem with file permition

Discussion in 'General Discussion' started by msmgaza, Nov 19, 2009.

  1. msmgaza

    msmgaza Registered

    Joined:
    Mar 10, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    when i try to edit exim.conf i have this error

    [ Error writing /etc/exim.conf: Operation not permitted ]
     
  2. 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:
    What is the username being used to access and attempt editing the Exim configuration file?

    Where exactly is the message being displayed at?

    Via root SSH access, please run the following commands and post the resulting output:
    Code:
    # stat /etc/exim.conf
    # lsattr /etc/exim.conf
     
  3. msmgaza

    msmgaza Registered

    Joined:
    Mar 10, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I have this error when i try to edit the file from the shell with root access
    and i have the message when i try to save the file


    stat /etc/exim.conf

    lsattr /etc/exim.conf


     
  4. 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:
    Please note that it is not recommended to manually edit the Exim configuration file ("exim.conf") directly via command-line; custom changes will not be fully saved unless the configuration file is edited properly using the available features at the following menu paths in WHM:

    WHM: Main >> Service Configuration >> Exim Configuration Editor
    Documentation: EximConfig < AllDocumentation/WHMDocs < TWiki
    WHM: Main >> Service Configuration >> Exim Configuration Editor >> Advanced Editor
    Documentation: AdvancedExim < AllDocumentation/WHMDocs < TWiki

    As seen via the output from "lsattr" (to list attributes) the file has two special attributes set, they are "a" and "u" and are described below as quoted from the Linux manual "man" page for "chattr":
    • A file with the ‘a’ attribute set can only be open in append mode for writing. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
    • When a file with the ‘u’ attribute set is deleted, its contents are saved. This allows the user to ask for its undeletion. Note: please make sure to read the bugs and limitations section at the end of this document. ... BUGS AND LIMITATIONS: The ‘c’, ’s’, and ‘u’ attributes are not honored by the ext2 and ext3 filesystems as implemented in the current mainline Linux kernels. These attributes may be implemented in future versions of the ext2 and ext3 filesystems.

    To read the manual or "man" page for "chattr" in full detail, please use the following command:
    Code:
    # man chattr
    To fix the issue and proceed with editing via WHM it will be necessary to remove the special attributes using the utility "chattr" (to change attributes) in a command like the following example:
    Code:
    # chattr -V -au /etc/exim.conf
     
  5. msmgaza

    msmgaza Registered

    Joined:
    Mar 10, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for help :)
     
Loading...

Share This Page