Trying to git pull in my web repo directory

Discussion in 'Installation/Configuration' started by AlexisC, Feb 7, 2019.

Tags:
  1. AlexisC

    AlexisC New Member

    I'm using a wordpress with an ispconfig but i have some issue to update my repo by using git pull.

    First, I noticed every files permissions by default are : web45 - client0
    But when Wordpress generate some files or when I upload files, permissions are : www-data www-data
    Is there something wrong here ?

    1 - When I try to run "git reset --hard origin/master" have this errors :
    fatal: cannot create directory at 'wp-content/cache/supercache/...': Permission denied
    This file permission is www-data

    2 - I tried to run "sudo -u www-data git pull origin master" but it ask me web45 user password ?

    3 - I tried to run "chown -R web45:client0 /home/www/clients/client0/web45/web" but can't cause of www-data permissions files.

    Can I force apache to use web45 user for every files except www-data ? Or this behavior normal ?
    Or did i try to do something wrong ? What should I so to use git properly ?

    (My website conf is : MOD-PHP // Suexec neable => I dont know if its important but give you also this information)

    Need your help... Thanks very much !
     
    Last edited: Feb 7, 2019
  2. AlexisC

    AlexisC New Member

    Ok I think I solved my issue.

    First : I set my website to PHP FAST-CGI in website setting of ISPCONFIG. Now every file are created by the correct user.
    Second : I logged in with root in ssh and run : chown -R web45:client0 /home/www/clients/client0/web45/web
    Third : run "git pull" with my normal ssh user

    it works !
    can you tell me if i'm doing the correct way.

    Thanks
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that's correct. mod_php should not be used for any website that runs a cms or shop as mod-php does not support suexec. So even if you enable suexec, PHP will still run under a wrong user. Use php modes php-fpm or php-fcgi for all websites.
     

Share This Page