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.

Change Ownership

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

  1. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    Hello and good day !

    I have a slight problem, I was using FASTcgi with Apache suEXEC set to [OFF]

    Now loads were going high and I could not see the actual owner so I put Apache suEXEC to [ON] and now I do see the owner of the command thats running, However non of the clients are permitted to change any file permissions " CHMOD " Is there any way or some SSH command to run or something to resture the users permissions.,


    Thank you.
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    How are the clients trying to change the permission of their files?
    What error message they receive while changing the permission?

    The problem seem to be with the ownership of the files/directories which is making it impossible for the clients to change the permissions. To fix the issue, correct file ownership of all the cPanel users using a shell script in one go.
     
  3. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    Via ftp and file manager - They get the error:

    in wordpress they change a permission and they get:

    R] SITE CHMOD 777 wp-cache-config.php
    [R] 550 Could not change perms on wp-cache-config.php: Operation not permitted

    This is by FTP I will also look at that guide now, Please note though it works fine when Apache suEXEC set to [OFF] just when enabled I need to configure it right.
     
  4. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    some may laugh here now but I am seriously nooby but trying to learn :D

    How would I run that
     
  5. kuldeep_

    kuldeep_ Well-Known Member

    Joined:
    Apr 24, 2010
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Looking at the error it seems that file wp-cache-config.php is not owned under your user. It seems to be owned by root or nobody user and so you are not able to change file permission. also check if the file has attributes set which is restricting you from changing file permission.

    I suggest you to ssh the server as root and then try changing permission.

    chmod 777 wp-cache-config.php
     
  6. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    I cannot CHMOD it - says permission not operated I dont know how to run the scripts to change it.

    Basicly I need to change the user from nobody:nobody to user:user
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    As an example:

    chown -R username:username /home/username/public_html/wordpress

    This will set all files in the directory /wordpress/ to be owned by that user.

    Once the end user owns it, they can change permission on files as needed. End users will need to ask the host (root) to run that command though, it cannot be accomplished from FTP or from users cPanel.

    You might be more interested in rebuilding Apache with SuPHP though, and you'd avoid this problem all together.

    On that page you see this: mod_suphp is considerably slower... while this sounds like something you're not interested in, IMO, ignore that warning.

    Many threads on this forum covering this topic that I'm sure you'll find helpful.
     
    #7 Infopro, Jun 1, 2010
    Last edited: Jun 1, 2010
  8. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    Thanks for the reply -

    Im kinda thick as you can see and things need to explained in " Dummy Mode " :rolleyes:

    so lets say - my user incpanel is " Hello "

    I would run this VIA ssh:

    chown -R Hello:Hello /home/Hello/public_html/wordpress

    Also I would like to run susPHP but I have a few forums that seem NOT to work onit, I tried everything for them :(
     
  9. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yep, your example is identical to mine. Only the names have been changed to protect the innocent. :p

    I'm not aware of any forum that would not work on a server running SuPHP. That said, if a forum is setup with some sort of caching configuration for example, you would indeed have to make some changes to the forums config to make it run properly.

    Name the forum software specifically you believe won't run and I may be able to advise a wee bit more there to help you out.
     
  10. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    IPB 3.0.5 version - Its not that it does not run - It does come online but then parts of the modifications do not work properly. I cannot figure it out as some other websites work - I chose FASTcgi so its quicker - IPB requires atleast 128m ram to function - Yet loads do go high do to javascripted shoutboxes they use.

    PS: That command did not work !

    chown -R Hello:Hello /home/Hello/public_html/

    Bascily change all ownership in the public_html ? This ok
     
  11. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    The keyword here is modifications. My guess is the user uploaded a mod thru the forum software which is a PHP script, and since you're not running SuPHP file ownership was changed during that upload thru a PHP script to nobody:nobody so of course it won't work properly, the user does not own the files for the mod any longer.

    IIRC, fastCGI and SuPHP will not work together. There are plenty of other ways to speed up a forum once you've moved to SuPHP though.
    If you wanted to stick with fCGI you could for example, create cronjob to run every hour and reset all file ownership issues as one alternative. Or simply run your command to sort owner every time you upload something via a PHP script.
    (silly I know, but people do)

    Personally I'd suggest SuPHP, added security, less headaches.

    I will personally guarantee you that the command I gave you, and the one you originally reposted with the name changed, would work.

    The below command is neither of them, you have a slash on the end of it.
    chown -R hello:hello /home/hello/public_html
    chmod 750 /home/hello/public_html


    Will work, exactly as I've typed it here for you. If you change this in any way, or run any other commands as root and are not sure of what you're doing, you can make one heck of a mess.

    Be careful.
     
    #11 Infopro, Jun 1, 2010
    Last edited: Jun 1, 2010
  12. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    yeah its just the matter of time finiding what controls what for IPB files / folders but still it does let me CHMOD except one file lol. Crazy
     
Loading...

Share This Page