Hide Forgot
Description of problem: When apcupsd daemon is installed by default on SELinux enforcing Fedora 15 system, the daemon is not permitted to write/access all the locations configured by default. This message popped on a fresh install of Fedora 15 x86_64 with LVM-based root partition and btrfs filesystem Version-Release number of selected component (if applicable): apcupsd-3.14.8-7.fc15.x86_64 How reproducible: Steps to Reproduce: 1. Install Fedora 15 2. yum install apcupsd 3. /sbins/service apcupsd start Actual results: Daemon starts and begins popping SEAlerts Expected results: Daemon should function without problems. Additional info: Here is the entire sealert: SELinux is preventing /sbin/apcupsd from read access on the lnk_file /var/lock. ***** Plugin restorecon (94.8 confidence) suggests ************************* If you want to fix the label. /var/lock default label should be var_lock_t. Then you can run restorecon. Do # /sbin/restorecon -v /var/lock ***** Plugin catchall_labels (5.21 confidence) suggests ******************** If you want to allow apcupsd to have read access on the lock lnk_file Then you need to change the label on /var/lock Do # semanage fcontext -a -t FILE_TYPE '/var/lock' where FILE_TYPE is one of the following: var_run_t, device_t, ld_so_t, proc_t, mta_exec_type, textrel_shlib_t, rpm_script_tmp_t, var_run_t, var_lock_t, bin_t, cert_t, device_t, devlog_t, locale_t, etc_t, proc_t, apcupsd_t, abrt_t, lib_t, root_t, init_t. Then execute: restorecon -v '/var/lock' ***** Plugin catchall (1.44 confidence) suggests *************************** If you believe that apcupsd should be allowed read access on the lock lnk_file by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # grep apcupsd /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp
# restorecon -R -v /var will fix this issue.
this should be caused just by wrong selinux context that can be fixed with command from comment #1. If it does not help, feel free to reopen.