File tree Expand file tree Collapse file tree
io/src/main/java/org/apache/pdfbox/io Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -384,9 +384,15 @@ private static void applyOwnerOnlyPermissions(Path dir) throws IOException
384384 if (aclView == null )
385385 {
386386 File tempDir = dir .toFile ();
387- tempDir .setReadable (true , true );
388- tempDir .setWritable (true , true );
389- tempDir .setExecutable (true , true );
387+ boolean isReadable = tempDir .setReadable (true , true );
388+ boolean isWritable = tempDir .setWritable (true , true );
389+ boolean isExecutable = tempDir .setExecutable (true , true );
390+ if (!isReadable || !isWritable || !isExecutable )
391+ {
392+ LOG .warn ("Unable to set owner-only permissions on temporary directory: {}. " +
393+ "Please ensure that the temporary directory is protected against unauthorized access." ,
394+ dir );
395+ }
390396 return ;
391397 }
392398
You can’t perform that action at this time.
0 commit comments