#!/usr/local/bin/perl
# use strict;
    my ($obj, $db) = @_;
    # my @files = $iB::CGI->param('chosen');
    # Get the octal representation
    # my $oct = oct($iB::IN{'the_value'});
    my $oct = oct('0777');
    #my $val = 777;
    my $count = 0;
    my $failed = 0;
    # for my $f (@files) {
    my $f = "/home/mcgreag/.html/ikonboard/Sources/Admin";
    # my $tmp = $obj->{full_path}."/$f";
    #    if (chmod ($oct, $tmp)) {
        if (chmod ($oct, $f)) {
            $count++;
        } else {
            $failed++;
        }
    print("$failed\i");
    $obj->show_dir($db, "CHMOD Permissions change result\\n\\n-$count- files changed successfully,\\n-$failed- files failed due to insufficient permission");
