rc.local question/problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to run clamav from rc.local so it happens whenever I power 
on and/or reboot. Script fails as though it can't open anything. Running 
the script as root works like a champ. Am I mistaken in thinking that I 
can run any *.sh file in ~root in rc.local and it will be run as root 
(meaning no permission problems).

Line in /etc/rc.d/rc.local:
/root/virus-scan.sh > /dev/null 2>&1

Summary of version in ~root/virus-scan.sh
#!/bin/sh
COMMON_DIRS="/home /tmp" # skipping all /bin /sbin et al for this test
/usr/bin/clamscan -ri $COMMON_DIRS --log="/var/log/clamscan.log"

Contents of log show /home as "can't open" and certain files in /tmp as 
"Permission denied"

Searching the web found only one forum that had a "doesn't work in 
rc.local, works if run as root command shell" but there is no answer to 
it. All the other links show different rc.local problems such as "isn't 
being run" and I can verify that my rc.local is being run

I have a call to "freshclam -d -c 2 -l /var/log/clam-update.log" that is 
working (though I keep getting out-of-date notice followed by up-to-date 
output when actually checking --- I'm trying to sort this out on clamav 
/ Fedora man pages)

Thanks in advance for any help (and let me know if I need to provide any 
more info)
Paul
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux