I have a php script that generates an selinux avc denial when it tries to exec a bash script.
Here is the alert:
SELinux is preventing /usr/bin/bash from execute access on the file /opt/cps/rcm/upsample.
You can generate a local policy module to dontaudit this access.
# grep /usr/bin/bash /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp
How about auto editing the info file? this can be done for the size and the extension name...Change Title field:Code:sed -i 's!^Title:.*$!Title:\t\t$F!' $F.infoChange Size field:[code]sed -i 's!^Size:.*$!Size:\t\t`du -h $F | cut -f 1`!' $F....
I'm trying to put together a grep command that will search a file (audit.log) for USERNAME=n where n is an unknown string and DATETIME=n n where both n's represent two 3-character values (day and month).
I have a bash script which I'm trying to get to replace dots in filenames and replace them with underscores, leaving the extension intact (I'm on Centos 6 btw). As you can see from the output below, the script works when there is a dot to replace, but in cases where the only dot is the extension, the script still tries to rename the file, instead of ignoring it.
I know i'm asking a lot of questions, but im just starting to learn this and it is very different that c
so heres my new question
im writing a script that changes file extension and or ending of files with not extensions. I have the code working to change the extension, but i'm trying to tell the user when they enter an extension that does not exist so they know there was an error in input.