Author Topic: PHP to execute sudo command  (Read 16200 times)

Govo

  • Guru
  • ****
  • Posts: 204
    • View Profile
Re: PHP to execute sudo command
« Reply #15 on: August 31, 2015, 07:34:49 pm »
Hi Posde

Nothing out of normal shown in the DansGuardian log, expect the site is denied. see log here http://pastebin.com/nXTWtJgp

Here's a 4 minute video to review if you have the time. nothing better then a video to explain stuff.
https://www.dropbox.com/s/jkh3b710hmqhl69/Exception%20IP%20error.mp4?dl=0

Basically I have purged the DansGuardian and reinstalled it.

I change the /etc/DansGuardian/Lists  to chown www-data:root /etc/dansguardian/lists/*

Edited  bannedsitelist via nano  and added grabone.ie as a blocked site.

Restarted DansGuardian visited the site and its blocked.

Edited the exceptioniplist via nano, added my IP restarted, revisited the site and site was allowed.

I then go to my scripts to update DansGuardian to remove the IP, revisit the site and its blocked.

I enter my IP, update DansGuardian, revisit the site and it's still blocked.

As you can see I in the video, when I edited under nano  it works, and when I execute my php scripts it doesn't.

I see you are on the IRC ...are you availabe to chat.


Cheers
Gov!

Govo

  • Guru
  • ****
  • Posts: 204
    • View Profile
Re: PHP to execute sudo command
« Reply #16 on: October 04, 2015, 11:42:29 pm »
Hi Guy's.

Back at it again this time with success, last time the exceptioniplist just wouldn't work if you updated the file with an ip address and reload the system, never less to say it was line of code in the php script that was causing the problem and when the file wrote, it wrote as Converted DOS-Formatted, so simple option was to remove the normal jazz and just write out the ip address. and she's now allowing exceptional ip's.

I have made some changes to the script as it didn't want to work with  8.10, the changes are, instead of restarting Dan's, I now have it reloading, which is a lot quicker, created a new bash script to reload Dan's  and  copy the files from /var/www/lmce-admin/dansguardian/files to /etc/dansguardian/lists/.

Now  showing the command on reload
Quote
* Reloading DansGuardian configuration...... Reloading DansGuardian configuration files. ...done.
so you can now see it loading instead of waiting 10 seconds for it to restart




Still a working process, but it's working.


Cheers
Gov


 
« Last Edit: October 05, 2015, 12:11:18 am by Govo »

Govo

  • Guru
  • ****
  • Posts: 204
    • View Profile
Re: PHP to execute sudo command
« Reply #17 on: October 05, 2015, 09:25:46 pm »
Just posting a quick update .I now have an App working for this project.

Can anyone confirm the blacklist work? For DansGuardian.

Thanks in  advance .
Gov

Govo

  • Guru
  • ****
  • Posts: 204
    • View Profile
Re: PHP to execute sudo command
« Reply #18 on: October 07, 2015, 09:44:57 pm »
Will do !
« Last Edit: October 08, 2015, 10:38:04 am by Govo »

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: PHP to execute sudo command
« Reply #19 on: October 08, 2015, 01:22:33 am »
Govo:  You are not posting in a LinuxMCE forum, you are posting in the AgoControl forums.

I suggest you start a new thread in the LinuxMCE users/developers forum and describe what the add-on is and does so that people are more informed.  The current thread should be considered dead imho. ;)

Great stuff btw!

J.

Govo

  • Guru
  • ****
  • Posts: 204
    • View Profile
Re: PHP to execute sudo command (CLOSED) NEW TOPIC OPEN
« Reply #20 on: October 08, 2015, 12:17:59 pm »
This topic is closed !