[ 
https://issues.apache.org/jira/browse/HIVE-24288?focusedWorklogId=505389&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-505389
 ]

ASF GitHub Bot logged work on HIVE-24288:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Oct/20 19:51
            Start Date: 27/Oct/20 19:51
    Worklog Time Spent: 10m 
      Work Description: nrg4878 commented on a change in pull request #1590:
URL: https://github.com/apache/hive/pull/1590#discussion_r512987958



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/processors/CompileProcessor.java
##########
@@ -241,6 +255,14 @@ CommandProcessorResponse compile(SessionState ss) throws 
CommandProcessorExcepti
         out.closeArchiveEntry();
       }
       out.finish();
+      try {
+        Set<PosixFilePermission> perms = EnumSet.of(
+              PosixFilePermission.OWNER_READ,
+              PosixFilePermission.OWNER_WRITE);
+        Files.setPosixFilePermissions(Paths.get(testArchive.toURI()), perms);
+      } catch (IOException ioe) {
+        LOG.warn("Lockdown permissions could not be set for the jar archive. 
JAR file could be open to other users depending on default FS permissions");

Review comment:
       if there is an exception here, I am marking the file to be deleted when 
the JVM exists.
   testArchive.deleteOnExit();
   
   I assumed this would be used from its location in case of CLI fat client. So 
we cannot delete the jar until the CLI exits.




----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 505389)
    Time Spent: 40m  (was: 0.5h)

> Files created by CompileProcessor have incorrect permissions
> ------------------------------------------------------------
>
>                 Key: HIVE-24288
>                 URL: https://issues.apache.org/jira/browse/HIVE-24288
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 3.1.0
>            Reporter: Naveen Gangam
>            Assignee: Naveen Gangam
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Compile processor generates some temporary files as part of processing. These 
> need to be cleaned up on exit from CLI.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to