Archive for the tag 'Permission'

SBDavid

Sharing Write Permission

Sharing Write Permission

For more than one user to be able to write to the same directory it will be necessary to grant write permission to a group they share in common. The following example grants shared write permission to /var/www to the group “webmasters”.

sudo chgrp -R webmasters /var/www
sudo find /var/www -type d -exec chmod g=rwxs “{}” \;
sudo find /var/www -type f -exec chmod g=rws “{}” \;

EXAMPLES

chgrp staff /u
Change the group of /u to “staff”.

chgrp -hR staff /u
Change the group of /u and subfiles to “staff”.

Unable to open configuration file /etc/psa/psa.conf: Permission denied

unable to open configuration file /etc/psa/psa.conf: Permission denied

Such errors are reported when Panel spam-filter processes incoming mail to mailbox with the Spamassasin feature enabled. Error is reported because spam-filter hook has no permission to access files in the /etc/psa directory. However, Spamassassin still processes messages correctly so this error does not mean Spamassassin is not working.

To workaround the issue it is possible to add the execute permissions for the /etc/psa folder.

chmod +x /etc/psa

Reference: http://parallels.com/

Checking Postfix file permission/ownership discrepancies

# postfix check

The first line (postfix check) causes Postfix to report file permission/ownership discrepancies.

# egrep ‘(reject|warning|error|fatal|panic):’ /var/log/maillog

The second line looks for problem reports from the mail software, and reports how effective the relay and junk mail access blocks are. This may produce a lot of output. You will want to apply some postprocessing to eliminate uninteresting information.

Permission denied error, while executing Nagios binaries

Nagios provides enterprise-class Open Source monitoring of hosts and services.

Make sure that the Nagios user has correct ownership/permissions to Nagios files in the Nagios installation directory.

Check if SElinux is enabled. If it is enabled, the Nagios binaries won’t be executed.

There are 3 alternative solutions for this.

1) Disable SElinux, SELINUX=disable.

2) Make it execute non-built-in services like Nagios by setting, SELINUX=permissive. This would cause the binaries to execute with only warnings logged to /var/log/messages.

If you go for the fix 1 or 2, you would need to reboot the server once.

3) You can change the security context of the Nagios binaries and make them executable with SElinux enabled.

chcon -t sbin_t /usr/local/nagios/sbin
chcon -R -t sbin_t /usr/local/nagios/sbin/