diff options
Diffstat (limited to 'libpiny')
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index 82f651d..8a26563 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -473,8 +473,8 @@ sub create { chdir( "/srv/git" ); # so git-clone can do the work of resolving local repo names for us if ( defined $source ) { - system( "/bin/chown", $user . "." . $user, $repo->path ) and die "Could not change ownership of repo path!"; # permissions are overridden later - if ( system( "/usr/bin/sudo", "-u", $user, "/usr/bin/git", "clone", "--bare", "--no-hardlinks", "--quiet", $source, $repo->path ) ) { # sudo -u $user needed in order to test user readability of whatever they want to clone. the mode o+rx should probably be masked off if we want private repos to stay private. + system( "/bin/chown", $user->name, $repo->path ) and die "Could not change ownership of repo path!"; # permissions are overridden later + if ( system( "/usr/bin/sudo", "-u", $user->name, "/usr/bin/git", "clone", "--bare", "--no-hardlinks", "--quiet", $source, $repo->path ) ) { # sudo -u $user needed in order to test user readability of whatever they want to clone. the mode o+rx should probably be masked off if we want private repos to stay private. system( "/bin/rm", "-r", $repo->path ) and die "Failed to clean up after failed clone operation!"; die( "Could not clone repository!\n" ); }; |