X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA5893857C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1595187272; bh=PqstpUp0v8YHTgb2OUNYDeQqb/tij7TMRSS+k2yubDk=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=HybqgbD4TwmRj1eyGi4GyJwyXaxl5/Gw5cf/Fc5Kkm1rWhYcIx75Z/YjeGEkBWo9K 5iu/tRX2TM1d48rQwgGukrJIuQFN0ksdhimNVJL0OqAMmAEiWg+ac3qcD4/IDjlOgr b4LVLpKedgUSjIS2Kf8IkKCW9ThkNCamlVkqBXOA= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3B2753858D34 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=O2NUIzeVjG5wvtkhY7zqdAVqxRFXG3wvsKm4vTiNvw4=; b=BASqs7PFyuBrdxKIVxrUBbzK4PNIKqc8u/QbwgQquKDOpd1ogEp8lE+JrBqJ63cFrd uvfuDH/OS0C3qacjQnDxW4qtFkxffbiuWiHo5K3lPJRPH8UkR5czpP0w4VHnCciQ/ISE Uu6PnxnRg3HFeakkfhxvH6QAstmPWJzz+p5/i79Jor7K2+WlVnXlV61b9NLkZNSvUMPb PP/HQssIKn3IoNgbaoygQ3bvTMLNfz3wTpC/g++Rd0sVJ8wwM3C7owUnsdbC+n8FZuS1 obBMFcFqCuiiKJspWZmgiqm+xG4MdPZfvT7kzMK07qo5JT1gqYAuVTvtpV6hioiFptmk Uwsg== X-Gm-Message-State: AOAM533QI6aQVf2ND9gkGvS/IuclSfFK8oSpY9+YgDNBOE5uQnHqTphw LTAlT6bbHe/k7FKVcrIEBsMLwVhYvmmAq75t/IjSFywwcGk= X-Google-Smtp-Source: ABdhPJxqO3qaj7g0/0Ceawlir1x/FI8FgCWx4L8+rCbdDwF4fMiXk9MqXIAQS7miGHHZgn5tnpJQAavb2o8Hf5/hdQw= X-Received: by 2002:a19:4857:: with SMTP id v84mr1015903lfa.195.1595187267472; Sun, 19 Jul 2020 12:34:27 -0700 (PDT) MIME-Version: 1.0 Date: Sun, 19 Jul 2020 12:34:16 -0700 Message-ID: Subject: Creating directories without permissions and timestamp on CYGWIN To: cygwin AT cygwin DOT com X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SCC_10_SHORT_WORD_LINES, SCC_5_SHORT_WORD_LINES, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Jayasurya p via Cygwin Reply-To: Jayasurya p Content-Type: text/plain; charset="utf-8" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 06JJZ0Kl012748 This was run on CYGWIN_NT-10.0 NVEBLODKIF 3.1.5(0.340/5/3) 2020-06-01 08:59 x86_64 Cygwin Creating a directory using mkdir API on C with 0777 permissions with the name having the following ASCII values causes the directory to be created with no user permissions and no timestamp. Length of the name is 66 character long including the terminating NULL character. ASCII values of characters in the string: 96 234 195 186 63 63 50 109 4 84 208 246 186 170 197 33 131 113 134 209 109 251 98 226 179 93 178 32 242 189 236 88 14 107 134 133 93 126 210 61 194 27 209 172 244 15 12 222 9 93 10 149 10 235 157 42 114 125 198 182 96 240 171 164 106 0 Unit test case to replicate the scenario #include #include #include int main () { char tempPath[66] = {96, 234, 195, 186, 63, 63, 50, 109, 4, 84, 208, 246, 186, 170, 197, 33, 131, 113, 134, 209, 109, 251, 98, 226, 179, 93, 178, 32, 242, 189, 236, 88, 14, 107, 134, 133, 93, 126, 210, 61, 194, 27, 209, 172, 244, 15, 12, 222, 9, 93, 10, 149, 10, 235, 157, 42, 114, 125, 198, 182, 96, 240, 171, 164, 106, 0}; mkdir(tempPath, 0777); return 1; } Terminal output after running the test case pinaki AT NVEBLODKIF ~/sandbox $ ls -l ls: cannot access '`'$'\352''ú??2m'$'\004''T'$'\320\366\272\252\305''!'$'\203''q'$'\206\321''m'$'\373''b'$'\342\263'']'$'\262'' '$'\362\275\354''X'$'\016''k'$'\206\205'']~'$'\322''='$'\302\033''Ѭ'$'\364\017\f\336\t'']'$'\n\225\n\353\235''*r}ƶ`'$'\355\276\263\357\201\252': No such file or directory ls: cannot compare file names ‘test.c’ and ‘`\352ú??2m\004T\320\366\272\252\305!\203q\206\321m\373b\342\263]\262 \362\275\354X\016k\206\205]~\322=\302\033Ѭ\364\017\f\336\t]\n\225\n\353\235*r}ƶ`\355\276\263\357\201\252’: Invalid or incomplete multibyte or wide character total 168 d????????? ? ? ? ? ? '`'$'\352''ú??2m'$'\004''T'$'\320\366\272\252\305''!'$'\203''q'$'\206\321''m'$'\373''b'$'\342\263'']'$'\262'' '$'\362\275\354''X'$'\016''k'$'\206\205'']~'$'\322''='$'\302\033''Ѭ'$'\364\017\f\336\t'']'$'\n\225\n\353\235''*r}ƶ`'$'\355\276\263\357\201\252' -rwxr-xr-x 1 pinaki Domain Users 167446 Jul 15 12:57 a.exe -rwxr-xr-x 1 pinaki Domain Users 3755 Jul 15 12:57 test.c -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple