Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Lock #95

Open
s3w47m88 opened this issue May 6, 2016 · 0 comments
Open

Git Lock #95

s3w47m88 opened this issue May 6, 2016 · 0 comments

Comments

@s3w47m88
Copy link

s3w47m88 commented May 6, 2016

Context:
Our server is setup so developers are apart of www-data group, and www-data group has read/write privileges. This allows WordPress, and any of my developers, to have read-write on any WordPress site without giving that developer sudo privileges or the domain user the Unix / SSH / SFTP username and password to a domain.

We then made it sticky using UMask so that if someone, including WordPress, creates new files it inherits those permissions so it remains read/writeable for all the write people.

But when Revisr is installed it found a way to ignore the UMask and give itself different perms. Thus breaking the flow above. Upon investigation we concluded it's something that is specific, or lacking, in how Revisr works so I'm hoping sharing our workaround below is enough to get this patched and a patch released.

Thank you!

Problem:
git commit -m "Pushing the latest." fatal: Unable to create 'public_html/.git/index.lock': Permission denied

Our Temporary Solution:

  1. Set sharedrepository = 1 in /etc/gitconfig (system-wide)
  2. Created test website /home/mysite/domains/testgit.mysite.com/
  3. In ./public_html on behalf of www-data user:
  • git init
  • p ../../test1.mysite.com/public_html/*.php ./
  • cp -R ../../test1.mysite.com/public_html/wp-* ./
  • git add --all
  • git commit -m "test"
  • git remote add origin [email protected]:mycompany/test1.com.git
  • git pull origin master - permissions 664 (on those files that didn't get merge conflict)
  • Pull request from Revisr - permissions 644. (and no merge conflicts, may be some git flags are being used?)
  • Umask set for user www-data to 002. Files uploaded to media library got 664 permissions.

So, I'm considering its a bug (or feature) of Revisr?

But you should be able to commit changes through Revisr, because it works on behalf www-data user, which is the owner of all the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant