[
https://issues.apache.org/jira/browse/KNOX-1814?focusedWorklogId=210997&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-210997
]
ASF GitHub Bot logged work on KNOX-1814:
----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Mar/19 13:48
Start Date: 11/Mar/19 13:48
Worklog Time Spent: 10m
Work Description: moresandeep commented on issue #68: KNOX-1814 - Moving
conf/data folder checking to Java layer from bash
URL: https://github.com/apache/knox/pull/68#issuecomment-471545224
Thanks for the PR @smolnar82 ! couple of things that I think would be good
to have:
1. In this patch we are checking whether the folder is readable and
writable, can we make sure that the permissions are not world readable (which
is the case currently), this would be really great to have, something like
PosixFilePermissions, this would help with KNOX-1432
`final Set<PosixFilePermission> permissions = new HashSet<>();
permissions.add(PosixFilePermission.OWNER_READ);
permissions.add(PosixFilePermission.OWNER_WRITE);
// not sure if we need this
//permissions.add(PosixFilePermission.OWNER_EXECUTE);
Files.setPosixFilePermissions(file.toPath(), permissions);`
2. Also, would be nice to have just one function check for read and write,
perhaps use a boolean flag to check if you strictly want to check for one over
the other.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 210997)
Time Spent: 50m (was: 40m)
> Move directory check to Java layer
> ----------------------------------
>
> Key: KNOX-1814
> URL: https://issues.apache.org/jira/browse/KNOX-1814
> Project: Apache Knox
> Issue Type: Improvement
> Components: Server
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Major
> Fix For: 1.3.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Currently, the following folder checks exist in {{gateway.sh}}:
> * {{conf}} directory exists and can be read?
> * {{data}}, {{log}}, {{pid}} directories exist and can be written?
> Only the {{conf}} and {{data}} folders are used by the Java code ({{log}} and
> {{pid}} only used in the bash script). Those directories are configurable
> using GATEWAY_HOME in the Java layer, therefore those checks should either be
> removed or fixed, so they take those variables into account.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)