You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "JeffreySmith (via GitHub)" <gi...@apache.org> on 2026/08/09 15:27:21 UTC

[PR] AMBARI-26622 Fix missing mode in sudo.makedir when Ambari is running as root [ambari]

JeffreySmith opened a new pull request, #4163:
URL: https://github.com/apache/ambari/pull/4163

   ## What changes were proposed in this pull request?
   This fixes an inconsistent behaviour between the root and non-root branches of makedir in sudo.py.
   
   In the root path, the `mode` option is silently dropped, while it is respected in the non-root path. Since mode is not passed, it will default to 0o777, which is unexpected behaviour when passing some other mode to the function.
   
   This is the non-root path:
   ```
   def makedir(path, mode):
       shell.checked_call(["mkdir", path], sudo=True)
       chmod(path, mode)
   ```
   In this path, mode is honoured and set as expected.
   
   ## How was this patch tested?
   No testing was performed - this just adds the mode parameter to os.mkdir that was previously silently ignored, but still required.


-- 
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: dev-unsubscribe@ambari.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org


Re: [PR] AMBARI-26622 Fix missing mode in sudo.makedir when Ambari is running as root [ambari]

Posted by "JiaLiangC (via GitHub)" <gi...@apache.org>.
JiaLiangC merged PR #4163:
URL: https://github.com/apache/ambari/pull/4163


-- 
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: dev-unsubscribe@ambari.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org