Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 19
  1. #1
    Member
    Join Date
    Nov 2008
    Posts
    19

    Default owner permissions suexec set up?

    Hello,

    new to cpanel and whm so hi to the community!

    Got whm and cpanel installed ok last week and migrating sites across as we speak.

    All pretty much ok with the end tweaks here and there.

    My biggest issue at the moment is ownership/permissions issue, specifically for joomla sites. I have reserached this and pinned it down to using suexec.

    However I have this enabled and despite my permissions being set correctly i still have write issues?

    Is there another step I have missed to the setup and what advice can anyone give me to allow scripts to run as the owner instead of nobody.

    I hope their is a solution that will update server wide as I have fair few sites all running similar php scripts.

    Thanks

    Frano

  2. #2
    Member
    Join Date
    Apr 2003
    Posts
    156

    Default

    Frano,
    * Generate a script which will correct ownerships and permissions under /home/*/public_html

    Code:
    grep '/home' /etc/passwd | cut -d: -f1 | awk {'print "chown -R /home/"$1"/public_html; chown :nobody /home/"$1"/public_html; chmod -R 755 /home/"$1"/public_html"'} > ~/fix_ownerships.sh
    * Run the generated script: "sh ~/fix_ownerships.sh".

    If after running the script you're still seeing 500/Internal Server Errors, the issue most likely related "php_flag" or "php_value" entries in the account's .htaccess file. Simply rename the .htaccess or comment out the lines.
    Dylan Botha

  3. #3
    Member
    Join Date
    Nov 2008
    Posts
    19

    Default

    Thanks stdout,

    this is a bit beyond my understanding but i'll give it a go.

    I dont have any internal server errors though? its just my permissions are set correctly but the scripts dont run due to ownership issues (I believe).

    Is this still the solution to my problem?

    Thanks

  4. #4
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,165
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Recompile apache with SuPHP. That's really what you're seeking long term.

  5. #5
    Member
    Join Date
    Apr 2003
    Posts
    156

    Default

    My mentioned command/script will correct permissions and ownerships under /home/*/public_html.
    This is what you ultimately need to do with suPHP.
    Dylan Botha

  6. #6
    Member
    Join Date
    Nov 2008
    Posts
    19

    Default

    Thanks people,

    But according to my whm suphp is running?

    I even tried recompling apache as indicated?

    It looks like suphp is running. Is there anything else I need to do for it to kick in? Reboot maybe?

    Thanks

  7. #7
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,165
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Easy way to test if things work for you, (since you mentioned Joomla) upload a theme, or some other com or mod for it. When you use the built in tools in Joomla to do this it creates directories and moves files to them.

    If you're not running SuPHP the directories won't be made and no files would be moved properly. Anything it does do, will have owner of nobody.

    And yes, once you've got SuPHP going, it's important that directories are all set permissions wise to 755 and files 644. No matter what any scripts install instructions tell you.

  8. #8
    Member
    Join Date
    Nov 2008
    Posts
    19

    Default

    Which was the reason for my first post.

    Joomla is installed and working fine for the most part, and the permissions are set correctly but highlighted as unwriteable in the admin section.

    As far as I can tell this seems like a classic ownership issue and all I have to do is ensure suphp is running correctly.

    despite indications in WHM that it is, I ahve a feeling I have missed something or need to take some other steps first.

    I am going to have another look from fresh now and will post if I fix, however, I am still open to suggestions?

    Thanks for taking the time to respond everyone.

    Frano

  9. #9
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,165
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Have you looked at your files via your FTP client to check owner and permissions? If owner is set wrong, you'll need to change them to the user who owns them of course.
    You could try the script mentioned above, or if you're familiar with shell you could fix them for this one account manually with this command:

    chown -R usernamehere:usernamehere /home/usernamehere/public_html/joomladirectory

    If you're not familiar with shell you might hire someone to fix this for you, or contact your host.


    Once you've got SuPHP setup and file owner and perms right, you should be good to go.

    Lots of threads on moving to SuPHP on these forums with lots of details you might want to know more about.

  10. #10
    Member
    Join Date
    Nov 2008
    Posts
    19

    Default

    I ran the script above and all went OK.

    except I cant access the site now from the temp url:

    http:myserver/~username/

    or the main url?

    I could access this before?

    Is this conected? Or is there a setting in WHm that also needs changing?

    Francis

  11. #11
    Member rhenderson's Avatar
    Join Date
    Apr 2005
    Location
    Oklahoma
    Posts
    742

    Default

    Yes WHM >> Main >> Security >> Security Center >> Tweakmod_userdir Security

    As for SuPHP is it set to run in WHM >> Main >> Service Configuration >> Apache Configuration >> Configure Suexec and PHP under Php5 Handler?
    Regards,
    Randy
    Affordable Web Hosting
    _________________________

  12. #12
    Member
    Join Date
    Nov 2008
    Posts
    19

    Default

    I have the userdir mod tweak unselected, is this correct?

    I have tried to access the URL with it set to on and off but still no luck with either setting.

    My settiungs for PHP are:

    Default PHP Version (.php files) 5
    PHP 5 Handler dso
    PHP 4 Handler none

    Apache suEXEC on

    Again is this right?

    Francis

  13. #13
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,165
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Check that page again and click the drop down list beside PHP 5 Handler, that says DSO. You'll find SuPHP listed there as well.

  14. #14
    Member
    Join Date
    Nov 2008
    Posts
    19

    Default

    I tried the drop down list next to PHP 5 and the options I have are:

    DSO
    CGI
    None

    Is suphp something I need to install elsewhere?

    Thanks

    Frano

  15. #15
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,165
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    During the setup for upgrading Apache, yes.

Similar Threads & Tags
Similar threads

  1. postwwwact set owner
    By jbnmedia in forum cPanel Developers
    Replies: 4
    Last Post: 06-02-2010, 07:57 AM
  2. file owner set to nobody
    By kosh2 in forum New User Questions
    Replies: 2
    Last Post: 10-04-2006, 08:46 AM
  3. Set Directory Owner Same As Process Owner
    By xxkylexx in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-21-2006, 02:22 PM
  4. Reseller Owner Permissions
    By sarahsboy18 in forum cPanel and WHM Discussions
    Replies: 17
    Last Post: 06-04-2006, 04:46 PM
  5. Required Owner+Permissions on CP themes?
    By ckizer in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-30-2005, 10:10 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube