Hi Kirti, Not sure what is the exact issue here but I'm not convinced that having FlinkSecurityManager is going to solve it. Here is the condition however: * cluster.intercept-user-system-exit != DISABLED (this must be changed) * cluster.processes.halt-on-fatal-error == false (this is good by default)
Here is a gist what Flink's SecurityManager does: /** * {@code FlinkSecurityManager} to control certain behaviors that can be captured by Java system * security manager. It can be used to control unexpected user behaviors that potentially impact * cluster availability, for example, it can warn or prevent user code from terminating JVM by * System.exit or halt by logging or throwing an exception. This does not necessarily prevent * malicious users who try to tweak security manager on their own, but more for being dependable * against user mistakes by gracefully handling them informing users rather than causing silent * unavailability. */ G On Wed, Mar 6, 2024 at 11:10 AM Kirti Dhar Upadhyay K via user < user@flink.apache.org> wrote: > Hi Team, > > > > I am using Flink File Source with Local File System. > > I am facing an issue, if source directory does not has read permission, it > is returning the list of files as null instead of throwing permission > exception (refer the highlighted line below), resulting in NPE. > > > > final FileStatus[] containedFiles = fs.listStatus(fileStatus.getPath()); > for (FileStatus containedStatus : containedFiles) { > addSplitsForPath(containedStatus, fs, target); > } > > Debugging the issue found that, SecurityManager is coming as null while > listing the files, hence skipping the permissions on directory. > > What is the way to set SecurityManager in Flink? > > > > Regards, > > Kirti Dhar > > >