-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 6.2.X EE, 7.0.0 M5
-
Fix Version/s: 6.2.4 CE GA5, 6.2.X EE, 7.0.0 M5
-
Component/s: Core Infrastructure, DM, Portal Services, Portal Services > Store
-
Labels:
-
Branch Version/s:6.2.x
-
Backported to Branch:Committed
-
Story Points:9
-
Fix Priority:4
-
Git Pull Request:
We are using File.mkdirs() method without checking its return value, so mkdir can fail and we don't throw any exception or process the error condition
I have detected this problem at com.liferay.portal.util.FileImpl at some Staging operations, but this issue can be found at other portal objects:
com.liferay.portal.aspectj.WeavingClassLoader com.liferay.portal.deploy.DeployUtil com.liferay.portal.image.FileSystemHook com.liferay.portal.image.SpriteProcessorImpl com.liferay.portal.jcr.jackrabbit.JCRFactoryImpl com.liferay.portal.scripting.ruby.RubyExecutor com.liferay.portal.servlet.filters.aggregate.AggregateFilter com.liferay.portal.servlet.filters.dynamiccss.DynamicCSSFilter com.liferay.portal.servlet.filters.dynamiccss.DynamicCSSUtil com.liferay.portal.util.FileImpl com.liferay.portlet.documentlibrary.store.AdvancedFileSystemStore com.liferay.portlet.documentlibrary.store.FileSystemStore com.liferay.portlet.documentlibrary.store.S3Store
As a solution, we should change the invocation of mkdir with FileUtils.forceMkdir this method throws a IOException in case of error at directory creation operation.