From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 23 13:30:47 2013 Received: (at submit) by debbugs.gnu.org; 23 Aug 2013 17:30:48 +0000 Received: from localhost ([127.0.0.1]:50543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCvCB-00020Z-6N for submit@debbugs.gnu.org; Fri, 23 Aug 2013 13:30:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47239) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCv4R-0000yU-Cj for submit@debbugs.gnu.org; Fri, 23 Aug 2013 13:22:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCv4O-0001Yj-Hp for submit@debbugs.gnu.org; Fri, 23 Aug 2013 13:22:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCv4O-0001Yf-FB for submit@debbugs.gnu.org; Fri, 23 Aug 2013 13:22:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCv4L-0004dH-Jt for bug-coreutils@gnu.org; Fri, 23 Aug 2013 13:22:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCv4J-0001W9-0T for bug-coreutils@gnu.org; Fri, 23 Aug 2013 13:22:41 -0400 Received: from mail-we0-x234.google.com ([2a00:1450:400c:c03::234]:58533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCv4I-0001Vo-Qi for bug-coreutils@gnu.org; Fri, 23 Aug 2013 13:22:38 -0400 Received: by mail-we0-f180.google.com with SMTP id q58so825278wes.11 for ; Fri, 23 Aug 2013 10:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=p1uVN94KeCWdwkJVesFBaU8eiHCWQvAYb9xOPgATq6U=; b=zPwVKChSYqsQvaSC15vUW9fTEHkXgCs0izpKvSWzVAgSlWNgfUqYj1ZzJ7TC/HYD7y CMxbFLLjYwUIzN86BbB/LtP4ELMNirrc6mCmTLCPu5HPYM1HRDj+hoVz9t4kkE441ETp VveGrjyCWAZf8vh/ioXLUGSp/GOeiwxRqJRK/clPK467NPlGlDKXUSdiGSAlA/u/YaGG swC0lGehFUfqp5X1Kh69Fa7n62R5G0Sof12VHSE3la9JFbCxw7gWflxRQlLZ7fMkcZX1 mungiX9yNEVNjwywBK8FbLzk5cHS/C+R7CaGVA4CetufS8tH4+h5a8Zwnidn+fONDbib WNEw== MIME-Version: 1.0 X-Received: by 10.180.205.163 with SMTP id lh3mr2932531wic.27.1377278557678; Fri, 23 Aug 2013 10:22:37 -0700 (PDT) Received: by 10.216.96.8 with HTTP; Fri, 23 Aug 2013 10:22:37 -0700 (PDT) Date: Fri, 23 Aug 2013 19:22:37 +0200 Message-ID: Subject: mkdir alway creates a file instead a direktory if it is run trough a sub sub shell From: horvan dillus To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary=001a11c381be2ff19a04e4a0a7af X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 23 Aug 2013 13:30:45 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --001a11c381be2ff19a04e4a0a7af Content-Type: text/plain; charset=ISO-8859-1 three scripts here first one getit.sh to get some scripts with wget second one install.sh to run the scripts and set up some things with bash third one the script the crates a subdir vin var/www regardless what im doing this creates a file with tha name of the directory.the mode option and verbose donsn't make anything better. The only situation this works correct is when I debug the script or the line with -x I haven't any Idea why this is how it is and I guess this needs further testing. --001a11c381be2ff19a04e4a0a7af Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
three scripts here

first one getit.sh t= o get some =A0scripts with wget
second one install.sh to run the = scripts and set up some things with bash
third one the script the= crates a subdir vin var/www regardless what im doing this creates a file w= ith tha name of the directory.the mode option and verbose donsn't make = anything better.=A0

The only situation this works correct is when I debug t= he script or the line with -x

I haven't any Id= ea why this is how it is and I guess this needs further testing.

=A0=A0
--001a11c381be2ff19a04e4a0a7af-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 23 14:33:39 2013 Received: (at 15168) by debbugs.gnu.org; 23 Aug 2013 18:33:39 +0000 Received: from localhost ([127.0.0.1]:50638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCwB1-0003lz-BB for submit@debbugs.gnu.org; Fri, 23 Aug 2013 14:33:39 -0400 Received: from joseki.proulx.com ([216.17.153.58]:55666) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCwAy-0003lj-5n; Fri, 23 Aug 2013 14:33:37 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 90C57211D5; Fri, 23 Aug 2013 12:33:33 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 69DBF2DC87; Fri, 23 Aug 2013 12:33:33 -0600 (MDT) Date: Fri, 23 Aug 2013 12:33:33 -0600 From: Bob Proulx To: horvan dillus Subject: Re: bug#15168: mkdir alway creates a file instead a direktory if it is run trough a sub sub shell Message-ID: <20130823183333.GA26081@hysteria.proulx.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15168 Cc: 15168@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) tag 15168 + moreinfo thanks horvan dillus wrote: > three scripts here > first one getit.sh to get some scripts with wget Please one bug per bug report. Three bugs would mean three separate reports please. One bug per report. Note that wget is a different project and any wget bugs would need to be reported to them not us. We don't have anything to do with wget here. > second one install.sh to run the scripts and set up some things with bash ?? > third one the script the crates a subdir vin var/www regardless what im > doing this creates a file with tha name of the directory.the mode option > and verbose donsn't make anything better. Please try to reduce the problem to a small test case. Show us exactly what you are doing so that we can reproduce the problem. If we can't understand what you are doing then we can't reproduce it and can't fix it. > The only situation this works correct is when I debug the script or the > line with -x > > I haven't any Idea why this is how it is and I guess this needs further > testing. Unfortunately you haven't told us anything about the problem. You say that mkdir is creating files not directories. But that is obviously not right since mkdir creates directories not files. Please describe exactly what you are doing. Saying that some script does something wrong is not enough information. If the problem is buried in some script then the simplest reason for a problem is that the script has a bug in it and not a problem with mkdir that is used by zillions of people in zillions of scripts every day. The simplest explanation is usually the correct one. Bob From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 23 14:48:57 2013 Received: (at 15168) by debbugs.gnu.org; 23 Aug 2013 18:48:57 +0000 Received: from localhost ([127.0.0.1]:50646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCwPp-0005Au-84 for submit@debbugs.gnu.org; Fri, 23 Aug 2013 14:48:57 -0400 Received: from joseki.proulx.com ([216.17.153.58]:55737) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCwPm-0005Ak-OO for 15168@debbugs.gnu.org; Fri, 23 Aug 2013 14:48:55 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 1C1F8211D5; Fri, 23 Aug 2013 12:48:52 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id E8C152DC87; Fri, 23 Aug 2013 12:48:51 -0600 (MDT) Date: Fri, 23 Aug 2013 12:48:51 -0600 From: Bob Proulx To: horvan dillus Subject: Re: bug#15168: mkdir alway creates a file instead a direktory if it is run trough a sub sub shell Message-ID: <20130823184851.GB26985@hysteria.proulx.com> References: <20130823183333.GA26081@hysteria.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15168 Cc: 15168@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Horvan, Please use reply-all to keep the bug log in the recipient list rather than reply to me privately. That way all of the team can participate. The bug log is that 15168 address in the recipient list. Thanks. I forward this to the bug log. horvan dillus wrote: > This is just one bug related to mkdir The short version of this > could be I ran mkdir in a sub sub shell and it creates a file > instead a directory as i mentioned in the subject. this has nothing > to do with wget. Sorry for the missunderstanding Please show us exactly what you did to cause mkdir to create a file instead of a directory. The use of a sub sub shell will not matter to mkdir. Until we see how you did this we will think it is not a bug in mkdir but is instead a bug in your script. But if you show us then all doubt is removed. Please show us. Bob From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 23 15:12:44 2013 Received: (at 15168) by debbugs.gnu.org; 23 Aug 2013 19:12:44 +0000 Received: from localhost ([127.0.0.1]:50677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCwmo-0005mq-VZ for submit@debbugs.gnu.org; Fri, 23 Aug 2013 15:12:43 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:63137) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCwmm-0005mh-5E for 15168@debbugs.gnu.org; Fri, 23 Aug 2013 15:12:41 -0400 Received: by mail-wi0-f171.google.com with SMTP id hr7so2347225wib.16 for <15168@debbugs.gnu.org>; Fri, 23 Aug 2013 12:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=YoQvR0zVAbpbVq7+PxHp89nhqoKuvK60TCGP6F+FJEA=; b=xJU8T/pSG46wao4iYzlg9RPFqRIjKRkLkyAcO9+rakK7nd2eZ/YEca3d9n+MdjZB64 6oYB/yN5sUD3CF1SULB43XsYzODXL+XmvJSEeB7SlifrnRNcJs+BI/XrQYwV/Px0tAzH 8jr5/3YDdmK/FYIZgLXvii3+rvHqoD4pNYkfoja2pk9GyAeMKgEBuO5mYoF7yQEZCFIM VssCbIVi+maxcoNSgo5+bXSNmI8I400Wvm4y1MemyMPqVVVWzt2skx3cLq5IqJVd4N1i 443X2Jif0f7OuNFxyKnV4u9rg27EeHhhfE/eg5TtzgUfaxHbyjyv5wEz1ZLjFGRZrGUU 1cfA== MIME-Version: 1.0 X-Received: by 10.194.86.228 with SMTP id s4mr88730wjz.66.1377285158963; Fri, 23 Aug 2013 12:12:38 -0700 (PDT) Received: by 10.216.96.8 with HTTP; Fri, 23 Aug 2013 12:12:38 -0700 (PDT) In-Reply-To: <20130823184851.GB26985@hysteria.proulx.com> References: <20130823183333.GA26081@hysteria.proulx.com> <20130823184851.GB26985@hysteria.proulx.com> Date: Fri, 23 Aug 2013 21:12:38 +0200 Message-ID: Subject: Re: bug#15168: mkdir alway creates a file instead a direktory if it is run trough a sub sub shell From: horvan dillus Content-Type: multipart/alternative; boundary=089e0102e3d2a7966904e4a2305e X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 15168 Cc: 15168@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --089e0102e3d2a7966904e4a2305e Content-Type: text/plain; charset=ISO-8859-1 For a better ovvervie I'll post the 4 scripts I mentioned above: Script one is written by a presiding file into .bashrc with the preeeded user ubuntu. #/!bin/bash # Bootstrap for first installation and Update. # This file have to be in loaded in the preseed file. cat << EOF >> /home/ubuntu/.bashrc if [ ! -d /opt/.drubuntu ]; then echo "We needd yourr password agin to finish the initial setup" sudo mkdir /opt/.drubuntu;cd /opt/.drubuntu; wget http://drubuntu.googlecode.com/git/scripts/getit.sh >/dev/null 2>&1 chmod +x /opt/.drubuntu/getit.sh ./getit.sh fi if [ -f /opt/.drubuntu/.bash_aliases } then; . /opt/.drubuntu/.bash_aliases fi EOF The second script is the script that fetches and runs install.sh #!/bin/bash export username=`echo $LOGNAME` DLURL=http://drubuntu.googlecode.com/git DIRURL=/opt/.drubuntu ISCRIPTSURL=/opt/.drubuntu/install echo "We need your password to finish the initial setup" sudo chown -Rh "$username" /opt/.drubuntu echo "prepering initial set up" mkdir $ISCRIPTSURL wget -O $DIRURL/setip $DLURL/scripts/setip.sh > /dev/null 2>&1 wget -O $DIRURL/setwallpaper $DLURL/scripts/setwallpaper.sh > /dev/null 2>&1 wget -O $DIRURL/install.sh $DLURL/scripts/install/install.sh > /dev/null 2>&1 wget -O $DIRURL/features $DLURL/features/features.sh > /dev/null 2>&1 wget -O $ISCRIPTSURL/copyfiles $DLURL/scripts/install/copyfiles.sh > /dev/null 2>&1 wget -O $ISCRIPTSURL/deb-packages $DLURL/scripts/install/deb-packages.sh > /dev/null 2>&1 wget -O $ISCRIPTSURL/downloadfiles $DLURL/scripts/install/downloadfiles.sh > /dev/null 2>&1 wget -O $ISCRIPTSURL/drupal7-core-setup $DLURL/scripts/install/drupal7-core-setup.sh > /dev/null 2>&1 wget -O $ISCRIPTSURL/drupal8-core-setup $DLURL/scripts/install/drupal8-core-setup.sh > /dev/null 2>&1 wget -O $ISCRIPTSURL/cleanup $DLURL/scripts/install/cleanup.sh > /dev/null 2>&1 chmod +x $DIRURL/*; chmod +x $ISCRIPTSURL/* sudo bash "$DIRURL"/install.sh the third script runs the script where the mkdir command is present #!/bin/bash if [[ $UID -ne 0 ]]; then echo "This script must be run as root, use sudo ./install.sh" exit fi echo "We'll now install all missing packages. This will take a while." ./install/deb-packages # > /dev/null to hide the output #uploadprogress setup pecl install uploadprogress > /dev/null 2>&1; #Check for uploadprogress file="/etc/php5/conf.d/uploadprogress.ini" if [ -f "$file" ] then echo "uploadprogress is already installed" else echo "extension=uploadprogress.so" >>/etc/php5/conf.d/uploadprogress.ini fi #fetch required files echo "Files needed will be downloaded now..." ./install/downloadfiles; echo "Required files will be copied to their locations" ./install/copyfiles; # grant previleges chown -Rh "$username":www-data /var/www; #create symbolic links ln -s /var/www $HOME/public_html; #setting up server hostname drupal.site; sudo a2enmod rewrite; sudo a2dissite default; sudo a2ensite drupal; sudo service apache2 restart; echo "Setting up Drush and Drupal" ./install/drupal7-core-setup read -p "Press [Enter] key if you have noted yourtr password..." #set privileges chown -Rh ubuntu:www-data /home/ubuntu/.drush; chown -Rh ubuntu:www-data /home/ubuntu/.drush/cache chown -Rh ubuntu:www-data /home/ubuntu/.drush/cache/default chown -Rh ubuntu:www-data /home/ubuntu/.drush/cache/usage ./install/cleanup chown -Rh "$username" /opt/.drubuntu echo "" echo "To change the MySql Root PWD 'MyRoot' enter"&& echo "" echo "mysql_secure_installation"&& echo ""&& echo "and follow the advice of the script! Your preseted password for MySql is MyRoot'" ./features --plymouth > /dev/null reboot -p and here is the last script where mkdir is present #!/bin/bash DLURL=https://drubuntu.googlecode.com/git #settiing up drush drush -y dl drush --destination=/usr/share; #Download and set up drupal * * *mkdir /var/www/d7* cd /var/www/d7 drush -y dl drupal; cd drup*; cp -r .htaccess .gitignore /var/www/d7; cp -r * /var/www/d7 cd /var/www/d7 rm -r drup*; mkdir /var/www/d7/sites/default/files; chmod 777 /var/www/d7/sites/default/files; cp -r "/var/www/d7/sites/default/default.settings.php" "/var/www/d7/sites/default/settings.php"; chmod 777 /var/www/d7/sites/default/settings.php; wget -O /var/www/d7/setupsite $DLURL/scripts/setupsite.sh >/dev/null 2>&1; chmod +x /var/www/d7/setupsite; chown -Rh "$username":www-data /var/www; chmod 644 /var/www/d7/.htaccess; chmod 644 "/var/www/d7/sites/default/settings.php"; chmod 644 "/var/www/d7/sites/default/default.settings.php" sudo bash setupsite cd /var/www/d7 The result of the mkdir line I've marked creates a file in var/www that is called d7 so the rest of the script fails. There are more scripts of course I hope this will be enough information to exermain if this is really a bug. 2013/8/23 Bob Proulx > Horvan, Please use reply-all to keep the bug log in the recipient list > rather than reply to me privately. That way all of the team can > participate. The bug log is that 15168 address in the recipient list. > Thanks. I forward this to the bug log. > > horvan dillus wrote: > > This is just one bug related to mkdir The short version of this > > could be I ran mkdir in a sub sub shell and it creates a file > > instead a directory as i mentioned in the subject. this has nothing > > to do with wget. Sorry for the missunderstanding > > Please show us exactly what you did to cause mkdir to create a file > instead of a directory. The use of a sub sub shell will not matter to > mkdir. > > Until we see how you did this we will think it is not a bug in mkdir > but is instead a bug in your script. But if you show us then all > doubt is removed. Please show us. > > Bob > --089e0102e3d2a7966904e4a2305e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
For a better ovvervie =A0I'll post the =A04 scripts I = mentioned above:

Script one is written by a presiding fi= le into .bashrc with the preeeded user ubuntu.

#/!bin/bash
# Bootstrap for first installation and Update.
# This file have t= o be in loaded in the preseed file.

cat << E= OF >> /home/ubuntu/.bashrc

if =A0[ ! -d /opt= /.drubuntu ]; then
echo "We needd yourr password agin to finish the initial setup&qu= ot;
sudo mkdir /opt/.drubuntu;cd /opt/.drubuntu;
wget <= a href=3D"http://drubuntu.googlecode.com/git/scripts/getit.sh">http://drubu= ntu.googlecode.com/git/scripts/getit.sh =A0>/dev/null 2>&1
chmod +x /opt/.drubuntu/getit.sh
./getit.sh
fi

if [ -f /opt/.drubuntu/.bash_aliases } then;
. /opt/.drubuntu/.bash_aliases
fi

EOF

The second script is the script that fet= ches and runs install.sh

#!/bin/bash
export username=3D`echo $= LOGNAME`
DLURL=3Dhttp://drubuntu.googleco= de.com/git
DIRURL=3D/opt/.drubuntu
ISCRIPTSU= RL=3D/opt/.drubuntu/install
echo "We need your passwor= d to finish the initial setup"
sudo chow= n -Rh "$username" /opt/.drubuntu
echo "prepering initial se= t up"
mkdir $IS= CRIPTSURL
wget -O $DIRURL/<= span class=3D"">setip $DLURL/scripts/setip.sh > =A0/= dev/null 2>&1
wget -O $DIRURL/<= span class=3D"">setwallpaper $DLURL/scripts/setwallpaper.sh > =A0/dev/<= /span>null 2>&1

wget -O $DIRURL<= /span>/install.sh $DLURL/scripts/install/install.sh > =A0 /<= span class=3D"">dev/= null 2>&<= /span>1
wget -O $DIRURL/<= span class=3D"">features $DLURL/features/features.sh <= span class=3D"" style=3D"color:rgb(102,102,0)">>= /dev/null 2= >&1

wget -O $ISCRIPT= SURL/copyfiles $DLURL/scripts/install/copyfiles.sh > =A0/dev/<= /span>null 2>&1
wget -O $ISCRIPTSURL/deb-packages $DLURL/scripts/install/= deb-packages.sh > /dev/null 2>&1
wget -O $ISCRIPTSURL/downloadfiles $DLURL/scripts/install/downl= oadfiles.sh >= =A0/dev/null 2>&1
wget -O $ISCRIPTSURL/drupal7-core-setup $DLURL/scripts/inst= all/drupal7-core-setup.sh > /dev/null 2>&1 =A0
wget -O $ISCRIPTSURL/drupal8-core-setup $DLURL/scripts/inst= all/drupal8-core-setup.sh > /dev/null 2>&1 =A0
wget -O $ISCRIPTSURL/cleanup $DLURL/scripts/install/cleanup.sh > =A0/dev/null 2>&= amp;1

chmod +x $DIRURL= /*; chmod +x $ISCRIPTSURL/*
sudo bas= h "$DIRURL"<= /span>/install.sh
=A0

the third script ru= ns the script where the mkdir command is present

<= div>#!/bin/bash
if [[ $UID -ne 0 ]]; then
=A0 =A0echo = =A0 =A0"This script must be run as root, use sudo ./install.sh"
=A0 =A0 exit=A0

=A0 fi
echo "W= e'll now install all missing packages. This will take a while."
=A0 ./install/deb-packages
# > /dev/null to hide the o= utput

#uploadprogress setup

pecl ins= tall uploadprogress > /dev/null 2>&1;

#C= heck for uploadprogress

file=3D"/etc/php5/con= f.d/uploadprogress.ini"
if [ -f "$file" ]
then
echo "upload= progress is already installed"
else
echo "ext= ension=3Duploadprogress.so" >>/etc/php5/conf.d/uploadprogress.in= i=A0
fi

#fetch required files

=
echo "Files needed will be downloaded now..."
./in= stall/downloadfiles;
echo "Required files will be copied to = their locations"
./install/copyfiles;

# grant previleges=A0

chown -Rh "$username":www-data /var/www;= =A0
#create symbolic links
ln -s /var/www $HOME/public_= html;

#setting up server

hostname dr= upal.site;
sudo a2enmod rewrite;
sudo a2dissite default= ;
sudo a2ensite drupal;
sudo service apache2 restart;

echo "Setting up Drush and Drupal"
= ./install/drupal7-core-setup=A0
read -p "Press [Enter] key i= f you have noted yourtr password..."
#set privileges
chown -Rh ubuntu:www-data /home/ubuntu/.drush;
chown -Rh ubu= ntu:www-data /home/ubuntu/.drush/cache
chown -Rh ubuntu:www-data = /home/ubuntu/.drush/cache/default
chown -Rh ubuntu:www-data /home= /ubuntu/.drush/cache/usage

./install/cleanup
chown -Rh "$username&q= uot; /opt/.drubuntu
echo ""
echo "To cha= nge the MySql Root PWD 'MyRoot' enter"&&=A0
echo ""
echo "mysql_secure_installation"&= &=A0
echo ""&&
echo "and fol= low the advice of the script! Your preseted password for MySql is MyRoot= 9;"
./features --plymouth > /dev/null
reboot -p

and here is the last script where mkdir is present
<= div>
#!/bin/bash
#settiing up drush
drush -y dl drush --destination=3D/usr/sh= are;
#Download and set up drupal

<= /b>
mkdir /var/www/d7

cd /var/www/d7
drush -y dl drupal;
cd drup*;
cp -r .htaccess .gitignore /var/www/d7;
cp -r * /var/www= /d7
cd /var/www/d7
rm -r drup*;
mkdir /var/ww= w/d7/sites/default/files;=A0
chmod 777 /var/www/d7/sites/default/files; =A0
cp -r "/= var/www/d7/sites/default/default.settings.php" "/var/www/d7/sites= /default/settings.php";
chmod 777 /var/www/d7/sites/default/= settings.php;
wget -O /var/www/d7/setupsite $DLURL/scripts/setupsite.sh >/dev/nul= l 2>&1;
chmod +x /var/www/d7/setupsite;=A0
chown= -Rh "$username":www-data /var/www;
chmod 644 /var/www/= d7/.htaccess;
chmod 644 "/var/www/d7/sites/default/settings.php";
chmod 644 "/var/www/d7/sites/default/default.settings.php"
sudo bash setupsite
cd /var/www/d7

=A0The result of the mkdir line I've marked creates a file in var/= www that is called d7 so the rest of the script fails.

=
There are more scripts of course I hope this will be enough informatio= n to exermain if this is really a bug.=A0




2013/8/23 Bob Proulx <bob@proulx.com><= br>
Horvan, Please use reply-all to keep the bug log in the recipient list
rather than reply to me privately. =A0That way all of the team can
participate. =A0The bug log is that 15168 address in the recipient list. Thanks. =A0I forward this to the bug log.

horvan dillus wrote:
> This is just one bug related to mkdir The short version of this
> could be I ran mkdir in a sub sub shell and it creates a file
> instead a directory as i mentioned in the subject. =A0this has nothing=
> to do with wget. Sorry for the missunderstanding

Please show us exactly what you did to cause mkdir to create a file instead of a directory. =A0The use of a sub sub shell will not matter to mkdir.

Until we see how you did this we will think it is not a bug in mkdir
but is instead a bug in your script. =A0But if you show us then all
doubt is removed. =A0Please show us.

Bob

--089e0102e3d2a7966904e4a2305e-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 24 14:46:41 2013 Received: (at 15168) by debbugs.gnu.org; 24 Aug 2013 18:46:41 +0000 Received: from localhost ([127.0.0.1]:52936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VDIr9-0004xN-Ps for submit@debbugs.gnu.org; Sat, 24 Aug 2013 14:46:40 -0400 Received: from joseki.proulx.com ([216.17.153.58]:32994) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VDIr5-0004x9-Je for 15168@debbugs.gnu.org; Sat, 24 Aug 2013 14:46:36 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 56C36211DA; Sat, 24 Aug 2013 12:46:32 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 3B2FC2DC87; Sat, 24 Aug 2013 12:46:32 -0600 (MDT) Date: Sat, 24 Aug 2013 12:46:32 -0600 From: Bob Proulx To: horvan dillus Subject: Re: bug#15168: mkdir alway creates a file instead a direktory if it is run trough a sub sub shell Message-ID: <20130824184632.GA30901@hysteria.proulx.com> References: <20130823183333.GA26081@hysteria.proulx.com> <20130823184851.GB26985@hysteria.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15168 Cc: 15168@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) horvan dillus wrote: > For a better ovvervie I'll post the 4 scripts I mentioned above: Wow. That is really quite a complicated report. It will take a lot of work to crack into it. If you can't simplify it then I doubt anyone will have enough time to do so for you. It is too big. It is completely dependent upon your environment. Please reduce this to something that another person could reproduce. I do have one question from the inspection of the scripts. Try making this change that I describe below. > and here is the last script where mkdir is present > > #!/bin/bash > DLURL=https://drubuntu.googlecode.com/git > #settiing up drush > drush -y dl drush --destination=/usr/share; > #Download and set up drupal > * > * > *mkdir /var/www/d7* > ... > The result of the mkdir line I've marked creates a file in var/www that is > called d7 so the rest of the script fails. First, those "*" characters, what are they? Two are on a line by itself. You said you marked a line. I think you confused things terribly when you did that. Because "*" is special to the shell. It is a file glob. The shell expands it to match a glob of characters. This makes it data dependent. When you have lines with only a "*" in the script on that line then what happens depends upon what files are in the current directory. Remove those star characters. Those are definitely bad. Fix that first. I can't stress this enough. Those are bad. Remove them. -* -* -*mkdir /var/www/d7* +mkdir /var/www/d7 Then on the line before the mkdir add a line that lists the file you are trying to make. This is a brute force print debug technique. But it may be the best for you. echo ================ before mkdir ls -ld /var/www/d7 mkdir /var/www/d7 ls -ld /var/www/d7 echo ================ after mkdir > There are more scripts of course I hope this will be enough information to > exermain if this is really a bug. I expect you will find that mkdir is making directories. If you are seeing it to be a file then I expect you will find that it was already a file before the mkdir. I expect that ls command will show that there was a file present and then the mkdir fails. Bob From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 23 18:54:07 2018 Received: (at 15168) by debbugs.gnu.org; 23 Oct 2018 22:54:07 +0000 Received: from localhost ([127.0.0.1]:38818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gF5Yt-0005T2-E2 for submit@debbugs.gnu.org; Tue, 23 Oct 2018 18:54:07 -0400 Received: from mail-it1-f175.google.com ([209.85.166.175]:52867) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gF5Yr-0005ST-Ee; Tue, 23 Oct 2018 18:54:05 -0400 Received: by mail-it1-f175.google.com with SMTP id 134-v6so3914817itz.2; Tue, 23 Oct 2018 15:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=+59fTuFMk81pNVVr5H3en1UMzAJmEn5d4g8lgUnnr98=; b=N87OLOnzctzoI8Rij6sbOjLjhTXVvF3z38DPH0aJYOyWjK9ebe08DYxgx/T9yfjo7p R1YCCXqS34CmgzuZdg1Z7trYbBgj+VmiT1uvTh9J5OSqD0xbVxXv7ycQHcHwshwxvJGD qnvrRr34972Oay4dM5RvxWO1+redigOzYNxokA/4UVlAx7QiKrVhbbm1P8Hsl/uN21Ww QW2VGLziIrJe6l1ydakb2AeLHbPrU48U5xaEr7l5+dKSV6U0xrqQLhVj0FCgtxZgjQTt YDIfXHRA8K/bpxUhd5rB6cE+TV+jRlAFg6cUj3N210MNULQna3XIlZf0Oy6WNJSMYiNr WUug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+59fTuFMk81pNVVr5H3en1UMzAJmEn5d4g8lgUnnr98=; b=IFeKZgZpwjZNxKrjrVK7LEi2ae3qea+55tcbO6wcHKI370azmJFo6uRtiid9DAvoWJ MJmG67NByiUvOhJNKTWdWLEd/8P33qbYmEH3Q/XUQrJbFMGwU9dH4fA5EB8/jB13/D2m EIeiYuYMjWxmlX37BAYPf36SF1z7gFn44d2HJqlkN9d85lucryyPhVEn09znU3T1Exj/ NWMWEyNjvgQVEJrHmY8+YVsjTGRd23CRUM+GpU9+DqLVt4zACDPTUKpu0tegSwOr9bqo iYMNBCQiSMIwEJJucpxp3vwqbrA7i4xyodIsAR7DyGLKFMZsjO9m3mGuMCFZXBYGWxY0 kPVg== X-Gm-Message-State: AGRZ1gLpg+9+O7QkggrADzRc56fVgN7eixBdRRCk4rB8QFvXGHBG8guF WYDBHsixOUjR5s5+5vsnWyVZWOrxf/c= X-Google-Smtp-Source: AJdET5cGJDhUkMB7D8dFhQgxWfpLlYYoVBMLLcFbpr8aug/3vPYJ0cUAAhS56olPwEraxIdWCsrb8g== X-Received: by 2002:a24:74d4:: with SMTP id o203-v6mr102198itc.81.1540335239436; Tue, 23 Oct 2018 15:53:59 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id u1-v6sm1366001itu.42.2018.10.23.15.53.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 15:53:58 -0700 (PDT) Subject: Re: bug#15168: mkdir alway creates a file instead a direktory if it is run trough a sub sub shell To: 15168@debbugs.gnu.org References: <20130823183333.GA26081@hysteria.proulx.com> <20130823184851.GB26985@hysteria.proulx.com> <20130824184632.GA30901@hysteria.proulx.com> From: Assaf Gordon Message-ID: Date: Tue, 23 Oct 2018 16:53:56 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20130824184632.GA30901@hysteria.proulx.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15168 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 15168 stop (triaging old bugs) On 24/08/13 12:46 PM, Bob Proulx wrote: > horvan dillus wrote: >> For a better ovvervie I'll post the 4 scripts I mentioned above: > [...] > First, those "*" characters, what are they? Two are on a line by > itself. You said you marked a line. I think you confused things > terribly when you did that. Because "*" is special to the shell. It > is a file glob. The shell expands it to match a glob of characters. > This makes it data dependent. When you have lines with only a "*" in > the script on that line then what happens depends upon what files are > in the current directory. [...] > >> There are more scripts of course I hope this will be enough information to >> exermain if this is really a bug. > > I expect you will find that mkdir is making directories. If you are > seeing it to be a file then I expect you will find that it was already > a file before the mkdir. I expect that ls command will show that > there was a file present and then the mkdir fails. > With no further comments in 5 years, I'm closing this bug. -assaf From unknown Sat Aug 16 21:15:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 21 Nov 2018 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator