diff options
author | Joe Rayhawk <jrayhawk@cobain.omgwallhack.org> | 2018-09-24 20:51:06 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@cobain.omgwallhack.org> | 2018-09-24 20:51:06 -0700 |
commit | 69965d3c022b04dd26df5f5e2b1217c438df0b4c (patch) | |
tree | 0650ef48d19cb83953d4790b4d5bc5449e7fcdd1 /libpiny/lib | |
parent | e405f85ab352f90802a00d26c110693d884cc01d (diff) | |
download | piny-code-69965d3c022b04dd26df5f5e2b1217c438df0b4c.tar.gz piny-code-69965d3c022b04dd26df5f5e2b1217c438df0b4c.zip |
libpiny: Piny::Repo: chmod and chgrp snowflakes
The snowflakes directory has mutable files such as packed-refs that need
to be group writable.
Diffstat (limited to 'libpiny/lib')
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index 174659f..61b4682 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -301,10 +301,10 @@ sub rebuild_git { }; # FIXME: we should verify we are not breaking someone else's object hardlinks with these chmod or chown operations - system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/packed-refs -type d -print0 | /usr/bin/xargs -0 /bin/chmod $dirperm" ) and die "Could not chmod shared git resources!"; - system( "/usr/bin/find " . $s->path . "/objects " . "-type f -print0 | /usr/bin/xargs -0 --no-run-if-empty /bin/chmod $immutablefileperm" ) and die "Could not chmod shared git resources!"; # most files are either immutable or replaced at link level - system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/packed-refs -type f -print0 | /usr/bin/xargs -0 /bin/chmod $fileperm" ) and die "Could not chmod shared git resources!"; # most files are either immutable or replaced at link level - system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/packed-refs -print0 | /usr/bin/xargs -0 /bin/chgrp " . $s->group->name ) and die "Could not chgrp shared git resources!"; + system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/snowflakes -type d -print0 | /usr/bin/xargs -0 /bin/chmod $dirperm" ) and die "Could not chmod shared git resources!"; + system( "/usr/bin/find " . $s->path . "/objects " . "-type f -print0 | /usr/bin/xargs -0 --no-run-if-empty /bin/chmod $immutablefileperm" ) and die "Could not chmod shared git resources!"; # most files are either immutable or replaced at link level + system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/snowflakes -type f -print0 | /usr/bin/xargs -0 /bin/chmod $fileperm" ) and die "Could not chmod shared git resources!"; # most files are either immutable or replaced at link level + system( "/usr/bin/find " . $s->path . "/refs " . $s->path . "/info " . $s->path . "/branches " . $s->path . "/objects " . $s->path . "/logs " . $s->path . "/HEAD " . $s->path . "/snowflakes -print0 | /usr/bin/xargs -0 /bin/chgrp " . $s->group->name ) and die "Could not chgrp shared git resources!"; $ENV{"GIT_DIR"} = $s->path; system( "/usr/bin/git", "config", "gitweb.owner", $s->owner->email->address ) and die "Could not git config gitweb.owner!"; |