Bug 1249794 - s2i security changes for 3.0.0 make certain file serving operations not permitted due to permissions (eg: php)
s2i security changes for 3.0.0 make certain file serving operations not permi...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Image (Show other bugs)
3.x
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Ben Parees
Wenjing Zheng
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-03 16:37 EDT by Erik M Jacobs
Modified: 2016-01-05 04:16 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 16:16:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Erik M Jacobs 2015-08-03 16:37:40 EDT
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 08:56:17 EDT
Erik have you had a chance to try this with a new image?
Comment 6 Erik M Jacobs 2015-09-22 10:21:20 EDT
Looks like it works.
Comment 10 Wenjing Zheng 2015-09-24 04:20:13 EDT
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.