File editor

Hello
Very good idea !
is there a manual way to add php.ini now ?

Sky
 
SSH ;)

You can also modify /usr/local/directadmin/data/templates/edit_files.txt adding php.ini to the list.
 
jmstacey said:
SSH ;)

You can also modify /usr/local/directadmin/data/templates/edit_files.txt adding php.ini to the list.

For the people who doesn't get it.

Just add
/usr/local/lib/php.ini=user=root&group=root&permission=644


at the buttom of /usr/local/directadmin/data/templates/edit_files.txt

To edit a file in putty just use
vi /usr/local/directadmin/data/templates/edit_files.txt
 
I know this is an old thread but I have a question, in the drop-down list of editable files are 24 listed but the edit_files.txt shows 34 files, is there a way to show all of whats in the edit_files.txt file?
reason I even found this was I wanted to add a file that I could edit and I see way more files there than in the file edit drop-down, after adding it to the bottom of the txt file and saving, it didnt show up as a file I could edit, so I moved it to just under a like file in the same location and then was able to edit it
 
I never have problems; when I add lines, they show up in DirectAdmin's drop-down list.

DirectAdmin version, OS Distribution/version, skin vendor & version?

Jeff
 
DirectAdmin 1.47.0
CentOS 6.0 64-Bit
DA enhanced
I have 24 to select from in the Drop Down menu,
but in the edit_files.txt it shows 34
I even tried switching to Power User and then the newest coolest free DA skin from dugalex , DA Glass with stats

(and yes, I scrolled down :)

what was I up to? well I get server load reports and they come with the Apache status page, ps and vmstats but say unable to retrieve the Apache server status with a 'unable to download, Forbidden' so I thought and found what file you change to add the allowed IP's and added 127.0.0.1 to that list in
/etc/httpd/conf/extra/httpd-info.conf=user=root&group=root&permission=644
I moved that line from the bottom to just under the other
/etc/httpd/......, and it showed in list
Now Im not sure that was the trick to make it allow the page to be recorded but I thought I'd give it a try

there have been some posts regarding the server loads and I have always used the Apache status to help point me to the trouble maker, but with the csf reports and sending a snap shot of the page at that time would help solve those sneak attacks. allowing me to see what was happening at the time of the load in question
 
Last edited:
You should deal with /usr/local/directadmin/data/templates/custom/edit_files.txt and remember about empty line at the very bottom.
 
I've just checked one of my servers again, and I was wrong.

I've tested both adding lines in the main templates directory, and with a new copy in the templates/custom directory. I've restarted DirectAdmin after the changes. I've tried with the standard enhanced skin.

In all cases, the extra lines do not show up.

So I'm inclined to call it a bug.

Jeff
 
Important to note that may files have this option:
Code:
&hide_if_not_exist=yes
which is why many files will not show up in the config.

But to test a large list, I created this file:
Code:
/usr/local/directadmin/data/templates/custom/edit_files.txt
with this code
Code:
/usr/local/directadmin/data/admin/ip_blacklist=user=root&group=root&permission=644/usr/local/directadmin/data/admin/ip_whitelist=user=root&group=root&permission=644
/etc/ssh/sshd_config=user=root&group=root&permission=644&secure=yes
/etc/httpd/conf/httpd.conf=user=root&group=root&permission=644
/usr/local/lib/php.ini=user=root&group=root&permission=644
/usr/local/php53/lib/php.ini=user=root&group=root&permission=644&hide_if_not_exist=yes
/usr/local/php54/lib/php.ini=user=root&group=root&permission=644&hide_if_not_exist=yes
/usr/local/php55/lib/php.ini=user=root&group=root&permission=644&hide_if_not_exist=yes
/usr/local/php56/lib/php.ini=user=root&group=root&permission=644&hide_if_not_exist=yes
/usr/local/php57/lib/php.ini=user=root&group=root&permission=644&hide_if_not_exist=yes
/usr/local/etc/php5/cgi/php.ini=user=root&group=root&permission=644&hide_if_not_exist=yes
/etc/exim.conf=user=root&group=root&permission=644
/etc/dovecot/dovecot.conf=user=root&group=root&permission=644
/etc/aliases=user=root&group=root&permission=644
/etc/proftpd.conf=user=root&group=root&permission=644
/etc/hosts.allow=user=root&group=root&permission=644
/etc/hosts.deny=user=root&group=root&permission=644
/etc/proftpd.vhosts.conf=user=root&group=root&permission=644
/usr/local/directadmin/conf/directadmin.conf=user=diradmin&group=diradmin&permission=600&secure=yes
/usr/local/directadmin/data/templates/edit_files.txt=user=root&group=root&permission=644&secure=yes
/usr/local/directadmin/data/templates/per_email_limit_email_message.txt=user=root&group=root&permission=644&secure=yes
/usr/local/directadmin/data/templates/custom/per_email_limit_email_message.txt=user=root&group=root&permission=644&secure=yes&hide_if_not_exist=yes
/etc/exim.key=user=mail&group=mail&permission=644
/etc/exim.cert=user=mail&group=mail&permission=644
/var/spool/exim/blocked_authenticated_users=user=mail&group=mail&permission=600&hide_if_not_exist=yes
/var/spool/exim/blocked_script_paths=user=mail&group=mail&permission=600&hide_if_not_exist=yes
/etc/httpd/conf/ssl.crt/server.crt=user=root&group=[B]rootpermission=[/B]600
/etc/httpd/conf/ssl.key/server.key=user=root&group=[B]rootpermission[/B]=600
/etc/httpd/conf/ssl.crt/server.crt=user=root&group=[B]rootpermission=[/B]600
/usr/local/directadmin/conf/cacert.pem=user=diradmin&group=diradmin&permission=400
/usr/local/directadmin/conf/cakey.pem=user=diradmin&group=diradmin&permission=400
/usr/local/directadmin/conf/carootcert.pem=user=diradmin&group=diradmin&permission=400
/etc/named.conf=user=root&group=root&permission=644&hide_if_not_exist=yes
/etc/bind/named.conf=user=root&group=root&permission=644&hide_if_not_exist=yes
/etc/namedb/named.conf=user=root&group=root&permission=644&hide_if_not_exist=yes
/home/admin/1.txt=user=root&group=root&permission=644
/home/admin/2.txt=user=root&group=root&permission=644
/home/admin/3.txt=user=root&group=root&permission=644
/home/admin/4.txt=user=root&group=root&permission=644
/home/admin/5.txt=user=root&group=root&permission=644
/home/admin/6.txt=user=root&group=root&permission=644
/home/admin/7.txt=user=root&group=root&permission=644
/home/admin/8.txt=user=root&group=root&permission=644
/home/admin/9.txt=user=root&group=root&permission=644
/home/admin/10.txt=user=root&group=root&permission=644
/home/admin/11.txt=user=root&group=root&permission=644
/home/admin/12.txt=user=root&group=root&permission=644
/home/admin/13.txt=user=root&group=root&permission=644
/home/admin/14.txt=user=root&group=root&permission=644
/home/admin/15.txt=user=root&group=root&permission=644
/home/admin/16.txt=user=root&group=root&permission=644
/home/admin/17.txt=user=root&group=root&permission=644
/home/admin/18.txt=user=root&group=root&permission=644
/home/admin/19.txt=user=root&group=root&permission=644
/home/admin/20.txt=user=root&group=root&permission=644
/home/admin/21.txt=user=root&group=root&permission=644
/home/admin/22.txt=user=root&group=root&permission=644
/home/admin/23.txt=user=root&group=root&permission=644
/home/admin/24.txt=user=root&group=root&permission=644
/usr/local/lib/php.ini=user=root&group=root&permission=644
and all of my extra /home/admin/*.txt files showed up fine.

It might be important to note that on this test box, the php.ini is an actual file:
Code:
-rw-r--r--. 1 root root 69649 Jul  7  2014 /usr/local/lib/php.ini
as on some systems, it might be a symbolic link, in which case, you don't want to be editing that one anyway.



Site note: A handy trick is to copy the file to the custom folder, and add this line at the bottom:
Code:
/usr/local/directadmin/data/templates/custom/edit_files.txt=user=root&group=root&permission=644&secure=yes
so you can edit the list.. in the editor.

I also found a bug, 3 lines have "=rootpermission=", I bolded them. Missing the &, fixed for next release.

John
 
you know how many times I looked at that list and never saw .....&hide_if_not_exist=yes
and if ya discount all those, guess how many are left?? yep 24 :eek:
well now for someone who considers myself observant, and maybe to observant, this IS a little embarrassing
So sorry for all the ruckus I caused :(

A wise man once told me this story.(J.L.)
Sherlock Holmes and Watson were out camping and Sherlock , looking up in the sky says to Watson, .Watson tell me what you see, Watson answered, (short version) I see the constellations, Orion and all these beautiful galactic wonders.
Sherlock says to Watson, Watson You Idiot, Someone stole our tent!!!!
 
Last edited:
Back
Top