Skip to content

Commit d5eb21b

Browse files
committed
Enforce Permissions During Packaging
Previously the packaging task expected that the permissions on the checked out source repository respected what was under source control and that those permissions were carried over to the copy. Since this cannot be dependend on, this change enforces permissions after copy. [resolves cloudfoundry#304]
1 parent a808635 commit d5eb21b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

rakelib/stage_buildpack_task.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ def copy_task(source, target)
3737
directory parent
3838
file(target => [source, parent]) do |t|
3939
cp t.source, t.name
40+
41+
if t.source.start_with? 'bin'
42+
chmod 0755, t.name
43+
else
44+
chmod 0644, t.name
45+
end
4046
end
4147

4248
target

0 commit comments

Comments
 (0)