http://qs321.pair.com?node_id=11123569


in reply to XML parser unable to open file

You note that the file exists, but is it readable?

An SSCCE would be useful.

And just in case, you are not specifying the exact string /path to file.xml as the path to the file are you?

Replies are listed 'Best First'.
Re^2: XML parser unable to open file
by rajaoirshi (Initiate) on Nov 11, 2020 at 05:40 UTC

    Hello

    Yes the files are readable and have been given full permission (777). The exact string passed is "/opt/xmls/filename.xml"

    The same set of code is already working in different servers, this one is being newly built and all the perl modules have been added , but this is where it is getting stuck. Is it possible due to Linux version, it might be a problem ? The new one/not working ones are on Red Hat Enterprise Linux Server release 7.8 (Maipo) and the old ones/working ones are on Red Hat Enterprise Linux Server release 6.7 (Santiago).

      the files are readable and have been given full permission (777)

      You really should not grant executable permissions to data files, set the "x" bit only for executables and for directories. Also, you usually do not want your files and directories group and world writeable, i.e. set the "w" bit only for the owner, but not for group and others.

      Continue reading in Re^3: CGI script to output data as CSV.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      Yes the files are readable and have been given full permission (777)

      What about the SELinux context? Did you check the audit log?


      🦛

      Thanks for clarifying wrt the file name. You still need to provide an SSCCE, though. What code you have provided is not self-contained, and does not include a file name.