Fixing Permissions of Valiases
Posted by Vanessa | Tagged under fixes,scripts | Posted on May 17, 2010
0
I wrote this script a while back to fix the permissions of alias files in /etc/valiases when users were having trouble creating forwarders. You can also download the script in plaintext here.
#!/bin/bash # Script to fix permissions of valiases # Written by: Vanessa Vasile 5/17/10 # http://thecpaneladmin.comfor domain in `cat /etc/userdomains |awk '{print $1}' | grep -v "*" | cut -d: -f1` do
if ! [ -f /etc/valiases/$domain ]; then touch /etc/valiases/$domain fiuser=$(egrep "^$domain:" /etc/userdomains |awk '{print $2}'); chown $user:mail /etc/valiases/$domain chown $user:mail /etc/vdomainaliases/$domain chmod 644 /etc/valiases/$domain chmod 644 /etc/vdomainaliases/$domain done
Update: cPanel now has a script to allow you to do this:
/scripts/fixvaliases
Related posts:





sending...
