ArafatKhan2198 commented on code in PR #6640:
URL: https://github.com/apache/ozone/pull/6640#discussion_r1601806694


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/OzoneManagerServiceProviderImpl.java:
##########
@@ -567,6 +594,41 @@ public boolean syncDataFromOM() {
     return true;
   }
 
+  private void checkAndValidateReconDbPermissions() {
+    File dbDir = new File(omSnapshotDBParentDir.getPath());
+    if (!dbDir.exists()) {
+      LOG.error("Recon DB directory does not exist: {}", 
dbDir.getAbsolutePath());
+      return;
+    }
+
+    try {
+      // Fetch expected permissions from configuration
+      String expectedPermissions =
+          ServerUtils.getPermissions(ReconConfigKeys.OZONE_RECON_DB_DIR, 
configuration);
+      String expectedPermissionsSymbolic =

Review Comment:
   Thanks for the comments and offline discussion @devmadhuu 
   I have made a few changes like your asked for :- 
   In new implementation:
   
   1. We retrieve the expected permissions from the configuration.
   2. We convert the expected permissions to a `Set<PosixFilePermission>`.
   3. We retrieve the actual permissions of the directory.
   4. We check if the actual permissions contain all the expected permissions.
   5. We log whether the actual permissions meet the minimum required 
permissions.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to