chmod(oct($DCONF->{perms0666}),"$DCONF->{admin_dir}/$dir") if $dir =~ m|\.txt$|;
next if $dir =~ m|^\.+$|;
chmod(oct($DCONF->{perms0777}),"$DCONF->{admin_dir}/$dir") if (-d "$DCONF->{admin_dir}/$dir" && $dir ne "source");
}
closedir(DIR);
opendir(DIR, "$DCONF->{message_dir}");
while (my $dir = readdir(DIR)) {
next if $dir =~ m|^\.+$|;
chmod(oct($DCONF->{perms0777}),"$DCONF->{message_dir}/$dir") if -d "$DCONF->{message_dir}/$dir";
}
closedir(DIR);
opendir(DIR, "$DCONF->{secdir}");
while (my $dir = readdir(DIR)) {
next if $dir =~ m|^\.+$|;
chmod(oct($DCONF->{perms0777}),"$DCONF->{secdir}/$dir") if -d "$DCONF->{secdir}/$dir";
}
closedir(DIR);
chmod(oct($DCONF->{perms0666}),"$DCONF->{message_dir}/$DCONF->{board_topics_file}") if -e "$DCONF->{message_dir}/$DCONF->{board_topics_file}";
chmod(oct($DCONF->{perms0666}),"$DCONF->{admin_dir}/secure/$DCONF->{board_topics_file}") if -e "$DCONF->{admin_dir}/secure/$DCONF->{board_topics_file}";