[Gambas-user] Bash-Script

T Lee Davidson t.lee.davidson at gmail.com
Sat Jun 4 03:40:35 CEST 2022

On 6/3/22 13:46, Hans Lehmann wrote:
> Hello.
> For a Gambas project I need (obviously) a special variant of the cp command in a bash script.
> The batch file cpwp2wo.sh is necessary to copy the folder with the generated website - described with HTML+CSS+GAMBAS (WebPage) 
> - into the folder where the web server looks for websites. In addition, the bash script takes care of the correct ownership of 
> folders and files, because the web server runs under the rights of the web user www-data as well as the appropriate rights. But 
> that is secondary here.
> In a folder ws_sample there are the three folders a, b and c as well as the batch file cpwp2wo.sh. Only all three folders are to 
> be copied to $HOME/public_html/cgi-bin - without the file cpwp2wo.sh. I am currently copying with this command. The batch file 
> is also copied.
> cp -r -u -v $HOME/WS/ws_sample/ $HOME/public_html/cgi-bin/
> Any hint will be gladly read.
> With kind regards
> Hans

Is there a problem with having the script file in the cgi-bin directory? Security reasons perhaps?

Could you create a dummy cpwp2wo.sh file with zero content and use the --no-clobber option? Or would that contradict the 
--update option?


More information about the User mailing list