In extensions.conf I include /scripts/*/*-dialplan.conf, so for example, I have a dialplan in /scripts/test/test-dialplan.conf and Asterisk is able to load it just fine.
I also have a file /scripts/test/vars.txt, but when using the ${FILE()} function to read, it doesn’t load any content from the file.
The same function works when I read any file under /etc/asterisk/. What am I missing?
Then, there is something permission-related. I can’t figure out why the same file will work when moved to another folder but won’t work in its original place, despite permission issues. Maybe some of our other friends on the forum might have some other ideas, as FILE() was supposed to work with files in any folder on the disk, as long as they were formatted correctly and accessible for read/write. The docs also don’t say anything about limitations on where you can put your files for FILE() to work.
Two three entirely orthogonal functions: execute permission to access an item, read access to see what items are there. And of course write access to put things there and take them out again. You can have one without the other(s).
I don’t think Asterisk checks for unsafe permissions, so, although there are issues, they shouldn’t affect access to the files, if you start from the root directory. Some software does check safety and will refuse to use files with directories like that.
Incidentally, using “ls -ld” is a simpler way of looking at the permissions for directories. SELINUX can generate permission errors even when the simple ls output looks right. Whilst this was a long to ago, I found that files uploaded with file transfer applications got marked as untrusted, so could produce permission failures.