I am trying to update text files in the root directory of my website using a Perl program in the public directory.
I can update files in the public directory with this same script but when I try in the root directory I get 'Bad file descriptor' as soon as I try to read in data. The files are text files set to 0666 permissions.
These problem files in my root directory are regularly read from by crontab.
Is there some sort of system like .htaccess that I need to configure?
I see this error once in a while on files I repeatedly open, however it doesn't seem to have a negative impact on my ability to use the file. because the only downside seems to be that error message I've not spent much time looking into it to get rid of it. As my other priorities subside and I find a solution I'll post it here.
Thank you for your thoughts on this, which BTW is still unresolved.
James Blond and gl smith - The < symbol means the file is being opened for input (read) only; it is not part of the file name. I believe the < is essential to read the file.
Voodoo Mill - Yes, there may be something in that. I read about 'Bad ioctl for device' and that seems to work in that way: if you investigate the error when the file isn't being opened or closed you get the error, but if you investigate when the file is being opened it disappears. It seems it's not really a problem at all!
All - I have rewritten the code to this, which stops the error, but I still don't know why the first way doesn't work. TMTOWTDI rules OK!
antares, you are correct as < is documented as being equal to no symbol and read mode. Next time I open a file I'll try it.