-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WFCORE-7102]: AccessDeniedException on Windows when using a read-only #6287
base: main
Are you sure you want to change the base?
Conversation
thanks @ehsavoie , Ideally, we should enable this test for Windows with this PR: https://github.com/wildfly/wildfly-core/blob/main/testsuite/manualmode/src/test/java/org/jboss/as/test/manualmode/management/ReadOnlyModeTestCase.java#L72-L74 But I know there are currently issues setting a read-only directory in the code since the CI won't be able to delete it. We can discuss it with @luck3y if there is any way to enable that permissions for Windows OS |
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi Yeray,
You should be able to create a directory in Windows and mark it read only,
ideally reversing the read only bit when the test is done. I don't think
any special permissions are required as long as you stay within the
checkout directory in CI.
Ken
…On Tue, Dec 17, 2024, 10:53 Yeray Borges ***@***.***> wrote:
thanks @ehsavoie <https://github.com/ehsavoie> , Ideally, we should
enable this test for Windows with this PR:
https://github.com/wildfly/wildfly-core/blob/main/testsuite/manualmode/src/test/java/org/jboss/as/test/manualmode/management/ReadOnlyModeTestCase.java#L72-L74
But I know there are currently issues setting a read-only directory in the
code since the CI won't be able to delete it. We can discuss it with
@luck3y <https://github.com/luck3y> if there is any way to enable that
permissions for Windows OS
—
Reply to this email directly, view it on GitHub
<#6287 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC7HAFYPUJN7DZHZDR5AGD2GBJHXAVCNFSM6AAAAABTY25IICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBZGAZDAMBQGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
bc35440
to
eb328cc
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
Weird, test still appears as ignored in Windows: https://ci.wildfly.org/buildConfiguration/WildFlyCore_PullRequest_WindowsJdk11/476232?buildTab=tests&name=ReadOnlyModeTestCase&suite=&package=org.jboss.as.test.manualmode.management WDYT @ehsavoie ? |
This comment was marked as outdated.
This comment was marked as outdated.
bd7f05f
to
eb173c8
Compare
@yersan This is properly fixed now and it works |
d0b7664
to
6f5d3fa
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made some trivial change requests. I've not tried to understand the meat of this, so please don't regard fixing my requests as an approval; rely on the others who are reviewing.
OTOH, mergers please don't block on my re-reviewing my trivial items before merging.
server/src/main/java/org/jboss/as/server/operations/ServerProcessReloadHandler.java
Outdated
Show resolved
Hide resolved
...e/manualmode/src/test/java/org/jboss/as/test/manualmode/management/ReadOnlyModeTestCase.java
Outdated
Show resolved
Hide resolved
...e/manualmode/src/test/java/org/jboss/as/test/manualmode/management/ReadOnlyModeTestCase.java
Outdated
Show resolved
Hide resolved
@luck3y Please review. |
|
||
Files.getFileAttributeView(roConfigDir, PosixFileAttributeView.class).setPermissions(perms); | ||
|
||
if (TestSuiteEnvironment.isWindows()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems odd to me, for Windows an ACL is constructed that denies the listed permissions, which seems correct, but on all other OSes are added as allowed. I'm probably missing something here though?
...e/manualmode/src/test/java/org/jboss/as/test/manualmode/management/ReadOnlyModeTestCase.java
Outdated
Show resolved
Hide resolved
…y configuration dir. * Replacing java.io.File.canWrite() by java.nio.file.Files.isWritable(Path) in: - ConfigurationFile - FilePersistenceUtils - ConfigurationFilePersistenceResource * Enabling the test for Windows and chaning the temp folder creation Jira: https://issues.redhat.com/browse/WFCORE-7102 Signed-off-by: Emmanuel Hugonnet <[email protected]>
The trivial items I mentioned have been addressed.
configuration dir.
Jira: https://issues.redhat.com/browse/WFCORE-7102