Hi all. Please bounce this message if it is a duplicated,since there was a small problem with the mail server last night.
Manuel,just a small addition to Richard's remarks,but please ignore it,if you had already acknowledged that. Commands,that using cat with sudo,to redirect the output to certain files that users have no write access,will fail. Eg. fcron. #-------------------------------# (~/jhablfs)sudo cat >> /etc/syslog.conf << "EOF" # Begin fcron addition to /etc/syslog.conf cron.* -/var/log/cron.log # End fcron addition EOF zsh: permission denied: /etc/syslog.conf #-------------------------------# Since the shell is doing the redirection (man bash -REDIRECTION),*before* the command is executed ,sudo can not see the redirection,so a new shell is needed for sudo to execute the actual command. Like so,the previous command should be something like this. #-------------------------------# (~/jhablfs)sudo sh -c "cat >> /etc/syslog.conf << "EOF" # Begin fcron addition to /etc/syslog.conf cron.* -/var/log/cron.log # End fcron addition EOF" #-------------------------------# Regards. Ag. -- http://linuxfromscratch.org/mailman/listinfo/alfs-discuss FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
