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.

How to stop permission change for /home/user/etc/?

Discussion in 'General Discussion' started by Lamar, Jul 24, 2003.

  1. Lamar

    Lamar Well-Known Member

    Joined:
    Jan 9, 2002
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    I have a large client who has started having problems. For over a year he has had a config.inc.php file in the /home/user/etc/ directory. For the past couple of days, the permissions on that directory have gotten changed from 755. His website stops working. I think Cpanel is changing the permissions each night.

    Would chattr +i /home/user/etc/ take care of it? (substitute in for the user)

    cPanel.net Support Ticket Number:
     
  2. tAzMaNiAc

    tAzMaNiAc Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sachse, TX
    Cpanel doesn't change permissions inside those directories. If you have Mandrake, it could be the msec doing it.

    Or maybe RH has something spiffy doing that kind of check.. I am not even sure what you are running so...

    cPanel.net Support Ticket Number:
     
  3. Lamar

    Lamar Well-Known Member

    Joined:
    Jan 9, 2002
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    Hi Taz-

    I'm running RedHat 7.3. This has never happened before in the past year.

    cPanel.net Support Ticket Number:
     
  4. Lamar

    Lamar Well-Known Member

    Joined:
    Jan 9, 2002
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    This started at the same time as the upgrade to Cpanel 7.x for Stable.

    He needs the permissions to be 755 (as they have been for over a year), but it keeps getting changed to 750.

    cPanel.net Support Ticket Number:
     
  5. TheRedX

    TheRedX Member

    Joined:
    Jul 9, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    No idea what is causing it, but you could set a cron script to change the permissions back every so often until you figure it out.

    cPanel.net Support Ticket Number:
     
  6. Matt-AWD

    Matt-AWD Member

    Joined:
    Jun 17, 2003
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I had this exact same problem. On top of that, any new accounts created would give a 403 Forbidden error unless I chmod'ed the public_html directory. I upgraded to the latest release of cpanel and the problem seems to be fixed.

    cPanel.net Support Ticket Number:
     
  7. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Wouldn't a chattr +i fix the problem no matter what the cause?

    cPanel.net Support Ticket Number:
     
  8. Lamar

    Lamar Well-Known Member

    Joined:
    Jan 9, 2002
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    That's what I think, also. I gave it a try earlier today, and will know by tomorrow.

    cPanel.net Support Ticket Number:
     
  9. Lamar

    Lamar Well-Known Member

    Joined:
    Jan 9, 2002
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    I was right, chattr +i /home/user/etc/ did resolve the issue.

    cPanel.net Support Ticket Number:
     
  10. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    16
    Re: Re: How to stop permission change for /home/user/etc/?

    Yes it does. The updates to CPanel does and it also screws with file ownership as well otherwise how would you explain how we found 2 of our client usernames chown to 8 files in our cgi-bin. Just another bloody bug or two.

    cPanel.net Support Ticket Number:
     
  11. Tim Greer

    Tim Greer Well-Known Member

    Joined:
    Aug 11, 2002
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Cpanel creates, modifies and removes files in /home/$user/etc. This is where it keeps the shadow and passwd files for POP email accounts. The permissions are there to protect the files from being read. While Cpanel screws up the permissions anyway (another story and another problem), you should not set that directory to immutable, if the user ever plans on adding, editing or removing POP email accounts.

    cPanel.net Support Ticket Number:
     
  12. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    The whole point of placing the file in that directory is wrong. Its a place where cpanel stores information about the user. Even if you want to place it in a directory in the /home/user, make a new one and place it there.

    My recommendations are don't use chattr +i inside that directory for any of the files.

    My 2 cents.

    cPanel.net Support Ticket Number:
     
  13. Lamar

    Lamar Well-Known Member

    Joined:
    Jan 9, 2002
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    Tim and Anand-

    Thank you for your input. I do agree with you and passed these concerns to my client. I'm not sure why he chose that directory, but feel it was a bad decision.

    He is between a "rock and a hard place". Since he developed that website for one of his clients over a year ago, it has grown to a major revenue for him. He can't afford major changes that will cause down-time to the website, as he will lose his client. On the other hand, the site ceased to function after each cpanel update.

    As a temporary fix, I went ahead and did a chattr +i /home/user/etc/, explaining to him what was being sacrificed. However, I don't feel good about the decision to do this.

    I would really like to know why it did not affect anything for over a year, but suddenly started. I'm not upset about it. It's more curiosity, I suppose.

    cPanel.net Support Ticket Number:
     
  14. Tim Greer

    Tim Greer Well-Known Member

    Joined:
    Aug 11, 2002
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    I'm not sure I understand how changing the path would result in a lot of effort or any downtime? If nothing else, you can use many tools on the server to make this change to any of the relevant files, or at home, even with search and replace with notepad, among others-assuming there are that many places. If it's used that many times, it should be ideally controlled from one global variable that can be changed in a configuration file, or at the top of one (or more) scripts, if need be. Anyway, good luck.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page