0

I am using Ubuntu and I am having the following problem.

I am using a PHP function called exec to get the latest git changes from my remote repo. E.g.: exec("git pull");.

The file is placed in /var/www. When accessing from shell (user 'myapp') works fine. When done from browser, doesn't seem to work correctly.

However, this doesn't seem to work. There could be 2 problems causing this (probably both): 1) the www-data user doesn't have sufficient permissions 2) git can't connect to my bitbucket repo because I don't have the public key for the www-data user so I can add that to BitBucket to allow access from this server

Is there anyone that can help with this permissions problem? Thanks in advance!

0

I fixed this by installing SuPHP, so the php script runs under the user, and not under www-data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.