update-website.sh

Anderson Lizardo lizardo at linuxfromscratch.org
Tue Jan 6 22:41:47 PST 2004


Greg Schafer wrote:
> On Wed, Jan 07, 2004 at 12:08:56AM -0400, Anderson Lizardo wrote:
> > You are member of the "lfswww" group, so you can run the script 
without 
> > problems. But run "run-update-website.sh" instead of 
> > "update-website.sh".
> 
> Thanks for reply Anderson. Unfortunately, no go :-(
> 
> rm: cannot remove `/home/httpd/www.linuxfromscratch.org': Permission 
denied

Same problem here :/. I thought this problem was already fixed, but it 
seems to persist. The problem is on the following "update-website.sh" 
snippet:

rm -rf $TARGETDIR
mv $NEWSITE $TARGETDIR

where TARGETDIR is /home/httpd/www.linuxfromscratch.org. /home/httpd is 
owned by http:http. Therefore the "rm -rf" cannot remove TARGETDIR 
(strangely, despite the "-r" option, the files under TARGETDIR are not 
removed). The command "mv $NEWSITE $TARGETDIR" will then move NEWSITE 
to _inside_ TARGETDIR, instead of overwriting it.

To workaround this problem, tar could be used to copy the entire NEWSITE 
tree to TARGETDIR:

tar -cC $NEWSITE . | tar  -xC $TARGETDIR

Any thoughts?
-- 
Anderson Lizardo
lizardo at linuxfromscratch.org
http://www.linuxfromscratch.org/




More information about the website mailing list