First, activate profile generation. Skip for repository section, just answer later (L):
sudo genprof -d /var/log/syslog /usr/sbin/apache2Second, open new console and try to restart apache service.
Setting /usr/sbin/apache2 to complain mode.
Please start the application to be profiled in
another window and exercise its functionality now.
Once completed, select the "Scan" button below in
order to scan the system logs for AppArmor events.
For each AppArmor event, you will be given the
opportunity to choose whether the access should be
allowed or denied.
Profiling: /usr/sbin/apache2
[(S)can system log for SubDomain events] / (F)inish
Keep this open, don't press (S) or (F) yet because we still have some task to be done.
sudo /etc/init.d/apache2 stopTry to access or test your web application, this will help apparmor to cache all permission for your web access directories and files. After you finish with web application testing go back to console which still running genprof command then Press (S). Genprof will prompt some question, and you may choose whether you want to allow or deny the permission.
sudo /etc/init.d/apache2 start
Once you finish with genprof, you will found this file /etc/apparmor.d/usr.sbin.apache2
Restart your apparmor then restart your apache daemon.
If some of your web application isn't accessible, see apparmor log to check is there any file permission has been blocked.
Jan 19 16:51:47 appserv02 kernel: [264251.884604] audit(1232355107.629:28228): type=1503 operation="inode_permission" requested_mask="r::" denied_mask="r::" name="/var/www/html/MyApps/index.php" pid=19234 profile="/usr/sbin/apache2" namespace="default"This error log means you need to give read permission to this file "/var/www/html/MyApps/index.php". Edit and Add this below rules to your /etc/apparmor.d/usr.sbin.apache2
/var/www/html/MyApps/index.php r,Try to restrat apparmor and apache server one more time. If you found more blocked permission from audit log, you may repeat above steps.
1 comments:
фотогалереи малолеток http://free-3x.com/ скачать насулуют малолетку free-3x.com/ скачать порно девочек школьниц [url=http://free-3x.com/]free-3x.com[/url]
Post a Comment