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.

Ownership Problem (I don't have Shell access)

Discussion in 'General Discussion' started by udinnet, Oct 19, 2010.

  1. udinnet

    udinnet Member

    Joined:
    Oct 18, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Hi there,
    I was having a big problem with new components installing via Joomla 1.5 and all the files that copied, became 99 ownership (nobody). I just checked the FTP layer settings of Joomla and there is no problem with those settings. When I uploading files via FTP client(fillezilla), that file have the correct ownership.

    Now I got a big trouble with those files that I installed via joomla. I can't delete or do any thing to them. Please can you give me a procedure for set correct ownership for those files without using shell/SSH. I do read some post about setting ownership by corn-jobs. But I can't actually figure out how to do that.

    Please can some one help me. Thanks.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    If you're not the Server Administrator, you'll need to contact them to help with this. To prevent this from being a problem in a the future, running SuPHP will help. The Server Administrator would need to implement this as well though, via Easy Apache from the server's WHM side of things.
     
  3. udinnet

    udinnet Member

    Joined:
    Oct 18, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the reply pro. But I'm getting my hosting facility via a reseller and I think he don't know how to configure SuPHP. Please can you mention any other way of chown files of my public_html directory.

    I'm very hopeless at this moment and can do any work without a solution for this.

    Thanks.
     
  4. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    To change the ownership from nobody to user, root login details required. You can't change ownership by using your reseller account login details. Its better if you contact your reseller account provider or upgrade your hosting plan from reseller to VPS or dedicated server. So that you can manage your own server. :)
     
  5. udinnet

    udinnet Member

    Joined:
    Oct 18, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I just implemented a cornjob and the code is

    Code:
    chown -R myusername:myusername /home2/myusername/public_html/*
    But this is a sample of the mail I received by cornjobs and there are all the file that has the 99(nobody user). But neither any file been able to set again original ownership.

    Is this happening with the privileges with my Cpanel account.:confused:
    Thanks.
     
  6. udinnet

    udinnet Member

    Joined:
    Oct 18, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Sorry!!! Just want to mention some thing. This server that my host is located is a Linux server.

    And I can contact root administrator of this dedicated server. Can anyone give me the cornjob code which can use by the root admin of the server to chown my account's all files
    . :)
     
  7. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    A cron (not corn) job is a normal Linux command, set to run on a schedule. The problem with the cron job that you have tried to use is that you are trying to change the ownerships of files that are not "yours"; they are owned by nobody, not the cPanel account user. The root user could set up a cron job to change the ownerships of these files, since root has superuser privileges that a regular account user lacks.

    What appears to me is that your host is using DSO (Apache module) as the PHP handler, and because of this, your sites scripts create files owned by the user nobody, since DSO runs PHP scripts as the nobody user. Because of this, you cannot change the ownerships of the files, since cPanel and FTP log you in as the account user, not nobody.

    To avoid this, you may want to ask your host if he/she has considered changing to suPHP. With suPHP as the PHP handler, all files will be created as the account user, instead of nobody, and you would not encounter this problem.
     
  8. udinnet

    udinnet Member

    Joined:
    Oct 18, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Thankyou for your valuable words. I understood the situation verymuch.

    According to your answer I think the root admin can set a cron job for only my account to chown files instead of configuring suPHP. Because suPHP work will confuse them. Am I correct? Then I will request him to do so.
     
  9. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    A cron job would be the most direct way to fix your particular issue. I wanted to mention suPHP because it does provide greater security and avoids this type of issue, but it is not much more complex than DSO.

    It is ultimately up to your host, however, and I only mentioned suPHP as a possibility, because it would be a way for your host to avoid having to create this type of cron job for each of his/her users, while at the same time having greater security.
     
  10. udinnet

    udinnet Member

    Joined:
    Oct 18, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Hi again
    Now I'm having another problem with adding a cron job. I advised my hosting admin to add a cron job for every five minutes with below code.
    Code:
    chown -R myusername:myusername /home2/myusername/public_html/*
    But he says that there is no place to put cron jobs in WHM. Should he use SSH? He tried to add a cron job to my cpanel via WHM. But the same problem occurred(Operation not permitted).
    So please give me a idea and procedure with codes how to overcome this problem. Thank you very much.
     
    #10 udinnet, Oct 21, 2010
    Last edited: Oct 21, 2010
  11. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    "Operation not permitted" error is occur because your hosting provide is setting cron under your cPanel hosting account, you can simply ask your hosting provider to add following corn in servers main cron file. Use following commands from shell to set cron.

    1st) Login in to server as root user.

    2nd) Open servers main cron file.


    3rd) Insert following command in cronfile

    4th) Save file and restart the crond service.

    In above cron command use your own cPanel user name instead of cpanelUSERname.
     
    #11 linux7802, Oct 21, 2010
    Last edited: Oct 21, 2010
  12. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    If your sysadmin does not know how to create a cronjob as root, you also may want to consider moving to a more knowledgeable hosting company, lol :D

    Best of luck with your host ;)
     
  13. udinnet

    udinnet Member

    Joined:
    Oct 18, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    @linux7802

    is the correct command
    or
     
  14. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The chown command expects a user and group separated by a colon ( : ), so this would be correct:

    Code:
    */5 * * * * find /home/cpanelUSERname/public_html/ -user nobody | xargs chown cpanelUSERname:cpanelUSERname
     
Loading...

Share This Page