Oracle Solution for Error ora-30159

Solution for Oracle Error ORA-30159

ORA-30159: OCIFileOpen: Cannot create the file or cannot open in the requested mode

What triggered the Error:

The create flag was specified in OCIFileOpen such that the file was to be created. But unable to do so. Or the file already exists and the permissions on it doesn't allow the file to be opened in in the requested open mode

What should we do to fix it:

Check whether the user has permissions to create the specified file or if the file exists whether the permissions on it allow the requested open mode.