Results 1 to 11 of 11
  1. #1

    SSH file ownership

    Hi Guys,

    Please forgive me as I am not a programmer of any sort, a webmaster at best.

    Ok: I am trying to install a script, however when entering my sql details into the install, I have this error:

    The following permissions should be presented for current user: ALTER, SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, FILE, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE ROUTINE, ALTER ROUTINE.

    In cpanel I have given privs to the user, and checked this various times.

    In my install.txt it also says:

    == USER RIGHTS ===
    If Apache is not running PHP as CGI, please make sure that you change the owner of the following files to your Apache user (in the below example apache, but can also be www-data or something else), or set the file permissions correct:

    $chown apache www/brandreviews.com/includes/work
    $chown apache admin/ext/tiny_mce/plugins/ajaxfilemanager
    $chown apache templates/default/images/uploaded
    $chown apache templates/default/images/icons
    $chown apache images/default/dynamic/banners
    $chown apache images/default/dynamic/banners/graphs
    $chown apache images/default/dynamic/banners/uploaded
    $chown apache images/default/dynamic/brands
    $chown apache images/default/dynamic/brands/uploaded
    $chown apache images/default/dynamic/brands/originals
    $chown apache images/default/dynamic/categories
    $chown apache images/default/dynamic/categories/large
    $chown apache images/default/dynamic/categories/thumbnails
    $chown apache images/default/dynamic/categories/mini
    $chown apache images/default/dynamic/categories/uploaded
    $chown apache images/default/dynamic/categories/originals
    $chown apache images/default/dynamic/categories/product_info
    $chown apache images/default/dynamic/menu
    $chown apache images/default/dynamic/menu/default
    $chown apache images/default/dynamic/menu/originals
    $chown apache images/default/dynamic/products
    $chown apache images/default/dynamic/products/uploaded
    $chown apache images/default/dynamic/products/originals
    $chown apache templates/default/images
    $chown apache includes
    $chown apache install
    $chown apache data
    $chown apache robots.txt

    I have been looking to do this and tried by reading on such forums as this with totally no luck what so ever.

    I have tried various SSH commands, but still having no luck with this.

    Any suggestions will be greatly appreciated. If anyone could help me with the commands please ?

    example : I have tried :

    chown root.root home/******/public_html/*******.com/includes/work

    Anyone please ?

  2. #2
    Join Date
    Dec 2011
    Location
    Montreal
    Posts
    334
    Quote Originally Posted by SimonBirch View Post
    Hi Guys,

    The following permissions should be presented for current user: ALTER, SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, FILE, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE ROUTINE, ALTER ROUTINE.

    In cpanel I have given privs to the user, and checked this various times.

    Try to see this: http://sourceforge.net/p/batavi/installation-issues/15/

    I still believe you didn't give rights on "user" to the database that "batavi" is using. Maybe I am wrong. Only your web hosting provider can see exactly what is the problem.

    Regards
    ROWEBCA
    Server Services

  3. #3
    Hey Rowebca

    Double and triple checked this, I have a WHM on a VPS so I have full access, and never come across this before.

    It seems alot of Batavi users are having the same issue, however I am not that technical to sort this out.

    Also to add :

    the link you suggested....

    Does not fix the problem, I gave that a try last week, no luck.
    Last edited by bear; 11-04-2013 at 09:30 PM.

  4. #4
    Join Date
    Jul 2005
    Location
    Huh... where am I again?
    Posts
    974
    In WHM, go to php configuration and see what the handler is set to. If it is set to php-cgi, as I would recommend, then do a chown back to the hosting user and see if that fixes it. Otherwise, make sure that apache is indeed running as the apache user and not nobody or httpd. Doing a ps aux | grep apache should show which user it is.
    -Steven | u2-web, LLC - Clustered Shared Hosting
    "It is the mark of an educated mind to be able to entertain a thought without accepting it" -Aristotle

  5. #5
    Hi Stephen,

    I enabled PHP=CGI as requested:

    the server info:

    [email protected] [~]# ps aux | grep apache
    root 1787 0.0 0.2 68584 4144 ? Ss Oct17 1:57 /usr/local/apache/bin/httpd -k start -DSSL
    nobody 7521 0.0 0.0 68716 1016 ? S Nov01 0:00 /usr/local/apache/bin/httpd -k start -DSSL
    nobody 7522 0.0 0.0 68716 1056 ? S Nov01 0:00 /usr/local/apache/bin/httpd -k start -DSSL
    nobody 7523 0.0 0.0 68716 1016 ? S Nov01 0:00 /usr/local/apache/bin/httpd -k start -DSSL
    nobody 7524 0.0 0.0 68716 1148 ? S Nov01 0:00 /usr/local/apache/bin/httpd -k start -DSSL
    nobody 7525 0.0 0.0 68856 928 ? S Nov01 0:00 /usr/local/apache/bin/httpd -k start -DSSL


    For the rest of the list it is user nobody, how do I change this ?

  6. #6
    try this
    chmod 777 home/******/public_html/*******.com/includes/work
    onto any file that you need permissions on. (chmod is change mode, 777 is just a representation of what permissions are allowed, it means everyone can read, write and execute the files)

  7. #7
    Join Date
    Jul 2005
    Location
    Huh... where am I again?
    Posts
    974
    Quote Originally Posted by SimonBirch View Post
    Hi Stephen,

    I enabled PHP=CGI as requested:
    Good, create a php file with <?php phpinfo();?> in the same folder you're installing the script. Now visit that phpinfo script in your browser and confirm the handler is coming up as php. If so, reset the ownerships to the ftp user via chown -R user public_html/ . Once that is done, you're all set.

    Quote Originally Posted by SimonBirch View Post
    [email protected] [~]# ps aux | grep apache
    root 1787 0.0 0.2 68584 4144 ? Ss Oct17 1:57 /usr/local/apache/bin/httpd -k start -DSSL
    nobody 7521 0.0 0.0 68716 1016 ? S Nov01 0:00 /usr/local/apache/bin/httpd -k start -DSSL [...]

    For the rest of the list it is user nobody, how do I change this ?
    Okay, nobody makes more sense on cpanel then apache user. It should be kept to that for security. Using PHP as cgi or fastcgi or fcgid is best for security instead of doing 777 permissions, especially if this server is shared among other users.
    Last edited by steven99; 11-04-2013 at 10:58 PM. Reason: adding all set after changing ownerships back to user.
    -Steven | u2-web, LLC - Clustered Shared Hosting
    "It is the mark of an educated mind to be able to entertain a thought without accepting it" -Aristotle

  8. #8
    Hi Steven,

    It is still showing nobody when I do the command as suggested.

    I did the PHPINFO file and php is showing correctly.

    On install: the error is still here:

    There was a problem connecting to the database server. The following error had occured:

    The following permissions should be presented for current user: ALTER, SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, FILE, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE ROUTINE, ALTER ROUTINE.

    Please verify the connection parameters and try again.

    Any suggestions please ?

  9. #9
    done !!!

    Thanks to you guys for helping me out, In the end it was the user permissions on the mysql user and database.

    Thanks again for your support

    Simon

  10. #10

    Re: SSH file ownership

    You mean you didn't give grant all privileges on dstabase for the user?
    The coder.

  11. #11
    Join Date
    Dec 2011
    Location
    Montreal
    Posts
    334
    Quote Originally Posted by SimonBirch View Post
    done !!!
    In the end it was the user permissions on the mysql user and database.
    What I told you in my reply to you:

    I still believe you didn't give rights on "user" to the database that "batavi" is using.
    Regards
    ROWEBCA
    Server Services

Similar Threads

  1. changing ownership of multiple accounts in cPanel using SSH, how? help pls.
    By sharmaine1111 in forum Hosting Security and Technology
    Replies: 3
    Last Post: 11-12-2009, 09:55 PM
  2. sftp file ownership
    By steelcase00 in forum Hosting Security and Technology
    Replies: 0
    Last Post: 05-19-2009, 05:39 PM
  3. reset file ownership
    By Uncle Mad in forum Programming Discussion
    Replies: 11
    Last Post: 08-30-2007, 01:42 AM
  4. How to change file ownership in SSH?
    By vito in forum Programming Discussion
    Replies: 16
    Last Post: 06-02-2006, 06:54 PM
  5. FTP and file ownership
    By netflax in forum Hosting Security and Technology
    Replies: 1
    Last Post: 07-12-2005, 06:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •