NSCD fails to create nscd.log debug log

This document (3428635) is provided subject to the disclaimer at the end of this document.

Environment

Novell SUSE Linux Enterprise Server 10
AppArmor 2.0

Situation

After uncommenting the 'logfile /var/log/nscd.log' parameter from /etc/nscd.conf and restarting nscd, the log file is never created or written to.

Using strace to monitor system calls by nscd, the following error can be seen when attempting to access the log file:

nscdout.log:31049 open("/var/log/nscd.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = -1 EPERM (Operation not permitted)

Resolution

AppArmor is enabled by default on SLES10. As part of the default AppArmor configuration, a predefined profile for NSCD exists which prevents the nscd process from accessing /var/log/nscd.log.

There are two possible resolutions to this issue. If AppArmor is not desired, it can be disabled through the following steps:

1. Prevent AppArmor from starting upon server startup - `chkconfig boot.apparmor off`
2. Remove AppArmor from memory - `rcapparmor stop`
3. Restart NSCD - `rcnscd restart`

If AppArmor functionality is desired, the profile for NSCD must be modified to allow access to the log file. This can be accomplished through the YaST | Novell AppArmor | Edit Profile module. Within this module, select the /usr/bin/nscd profile and select to"Add Entry" for the file /var/log/nscd.log. Grant the "Write" permissions to this file.

After making any profile changes to AppArmor, restart NSCD using `rcnscd restart` and the log file will be properly created.

Additional Information


Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:3428635
  • Creation Date: 27-Nov-2007
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center