Skip to content

Commit

Permalink
Remove failing chmod call
Browse files Browse the repository at this point in the history
This call leads to the error on `git clone`:
> Worker: RepositoryFetchingWorker
> Arguments: 1, "clone", "fork"
> Error: Errno::EPERM: Operation not permitted @ chmod_internal - /data/git/repositories/1/

Instead, we should set the umask correctly:
umask 002
  • Loading branch information
eugenk committed Nov 14, 2016
1 parent e6c4495 commit 5a1249e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
5 changes: 0 additions & 5 deletions lib/git_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@ def initialize(path)
else
FileUtils.mkdir_p(Ontohub::Application.config.git_root)
@repo = Rugged::Repository.init_at(path, true)
set_group_permissions
end
end

def set_group_permissions
FileUtils.chmod_R('g+ws', path)
end

def destroy
FileUtils.rmtree(self.path)
end
Expand Down
8 changes: 2 additions & 6 deletions lib/git_repository/cloning.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ def clone(url)
fetch: '+refs/*:refs/*',
mirror: 'true'

result = pull
set_group_permissions
result
pull
end

def clone_svn(url)
Expand All @@ -32,9 +30,7 @@ def clone_svn(url)
end

set_section %w(svn-remote svn), options
result = pull_svn
set_group_permissions
result
pull_svn
end

def pull
Expand Down

0 comments on commit 5a1249e

Please sign in to comment.