[ 
https://issues.apache.org/jira/browse/HDDS-7153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-7153:
---------------------------------
    Labels: pull-request-available  (was: )

> User defined override of ozone shell  hardcoded values for log files
> --------------------------------------------------------------------
>
>                 Key: HDDS-7153
>                 URL: https://issues.apache.org/jira/browse/HDDS-7153
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Neil Joshi
>            Assignee: Neil Joshi
>            Priority: Major
>              Labels: pull-request-available
>
> Currently the ozone shell, $ozone sh, command uses the hard-coded value for 
> the shell logs, {*}ozone-shell.log{*}.  This Jira is to allow users to 
> override the log name by letting them set user defined log file names through 
> an appended environment variable.
>  
> The first time the ozone sh is run it creates a log file named 
> ozone-shell.log in the $OZONE_LOG_DIR.  What is observed is that when 
> switching the shell user, the new user cannot invoke the ozone sh command 
> successfully.  Instead the user receives a trace of errors indicating the 
> user does not have permission to access the ozone-shell.log file:
> anotheruser _cannot access_ file set by user hadoop that initially invoked 
> the ozone sh
>  
> {code:java}
> [anotheruser@d8e5ed3fbc4a hadoop]$ ozone sh
> log4j:ERROR setFile(null,true) call failed.
> java.io.FileNotFoundException: /var/log/hadoop/ozone-shell.log (Permission 
> denied)
>     at java.base/java.io.FileOutputStream.open0(Native Method)
>     at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
>     at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
>     at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:158)
>     at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
>  
> {code}
>  
> {code:java}
> $ ls -alt /var/log/hadoop/ozone-shell.log 
> -rw-r--r-- 1 hadoop hadoop 0 Aug 19 18:37 
> /var/log/hadoop/ozone-shell.log{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to