Gargi-jais11 commented on code in PR #9735:
URL: https://github.com/apache/ozone/pull/9735#discussion_r2825962643


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/MutableVolumeSet.java:
##########
@@ -179,6 +181,15 @@ private void initializeVolumeSet() throws IOException {
           throw new IOException("Failed to create storage dir " +
               volume.getStorageDir());
         }
+
+        // Ensure permissions are set on the storage directory
+        // (permissions are also set in StorageVolume.initializeImpl(),
+        // but this ensures they're set even if directory already existed
+        // from a previous run with incorrect permissions)
+        if (volumeType == StorageVolume.VolumeType.DATA_VOLUME) {

Review Comment:
   The `volumeType == StorageVolume.VolumeType.DATA_VOLUME` check is correct. 
Permission setting is only for data volumes.
   META_VOLUME (MetadataVolume) - Stores Ratis metadata which is managed by 
Ratis.
   DbVolume  is for db instance storage. So not sure we can use same config 
hdds.datanode.dir.data.permissions over here as well. However the parent 
`hdds/` directory is the HddsVolume storage dir and gets permissions from 
`hdds.datanode.data.dir.permissions (default 700)`. So `container.db` is 
already protected by that parent hierarchy.



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