Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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