Bug 1249794 - s2i security changes for 3.0.0 make certain file serving operations not permitted due to permissions (eg: php)
Summary: s2i security changes for 3.0.0 make certain file serving operations not permi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Image
Version: 3.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-03 20:37 UTC by Erik M Jacobs
Modified: 2016-01-05 09:16 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 21:16:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Erik M Jacobs 2015-08-03 20:37:40 UTC
Recent changes to S2I images make the application tree area not manipulatable by the application itself. For example, the following app cannot work because it expects to write to $"HOME"/uploads:

https://github.com/rjleaf/openshift-php-upload-demo

In this case, it's possible for PHP to write the file to /tmp but it cannot actually be served from there because of the Apache configuration.

More generically, it appears that there is a problem where it doesn't seem possible to write files dynamically to an area that is directly accessible to the end-user. In the case of the uploader above, we would need to write a php snippet that actually serves the file from /tmp, which seems excessive.

Comment 5 Ben Parees 2015-09-22 12:56:17 UTC
Erik have you had a chance to try this with a new image?

Comment 6 Erik M Jacobs 2015-09-22 14:21:20 UTC
Looks like it works.

Comment 10 Wenjing Zheng 2015-09-24 08:20:13 UTC
Verified with below image versions, file can be uploaded successfully.
php-56-rhel7     dec85bdb8bb4  
php-56-centos7   e3e4108f68d8       
php-55-rhel7     f77960b78c89 
php-55-centos7   61c50b1ca0e3


Note You need to log in before you can comment on or make changes to this bug.