Removing Files From Configuration File Editor

I am adding files in the Configuration File Editor and while two of the files are under the Asterisk Custom Configuration Files tree and I can edit as expected, I find that I somehow placed two other files under the Asterisk System Configuration Files tree. These two are reported as not writable in the File Editor no matter what permissions I set on these files. I assume their status (not writable) is the reason I can’t delete them from with in the Configuration File Editor, either. I can delete the files via command line, but they are still listed in the Configuration File Editor screen within FreePBX.

What is the best way for me to remove these two files that are in the Asterisk System Configuration Files tree? If I had a way to move them in the Asterisk Custom Configuration Files tree and could edit them, that would be great, too.

If nothing else, I do have a backup if a restore would address this.

Thanks.

Can you tell us the names of the problem files?
Is it possible you created these files from the command line, by manually copying an existing conf file? Here’s what I’m noticing from my tests:
If I create a file through the Configuration File Editor gui(Add New File), I will see it listed in the Custom config section, and it can be edited and deleted through the gui as expected.

Things are different if I created the new file from the command line, by making a new file or copying an existing one. For example, I added /etc/asterisk/newconfig.conf from the terminal. This will exhibit what you’re seeing. The file is unwriteable and listed under the System section in the gui.
To repair this I have to add “_custom” to the file name, and make sure it’s owned by asterisk with the proper permissions. For example:
-rw-rw-r-- 1 asterisk asterisk 0 Apr 5 2019 newconfig_custom.conf
In that state, the file is now listed under the Custom tree, and can be deleted from the gui. Can you see if that scenario can be applied to your situation to get things working?

I haven’t been able to reproduce a situation where a file deleted from the command line is still showing up in the gui. If you’re still seeing that, then maybe try recreating the file from the command line, and then applying the changes above could help get things cleaned up. I think things can get a bit weird if the files were created from the command line, which is my guess as to what’s going on.

Aside from that, a backup restore should fix it.

Thanks! That was it.
I was adding config files for the Aastra phones I am testing. Once they are up and running, I don’t see a lot of changes on the extension files, but the directory.csv file may be nice to modify from within FreePBX as entries change with time.

I must have added the MAC.cfg files via command line first instead of adding the file names through the Configuration File Editor. I removed the files and refreshed the Editor page and the entries are now gone.

Thanks again for you time!

Edit: I thought I deleted those files via command line and refreshed, but they are gone now.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.