From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29343 invoked from network); 12 Jan 2021 21:38:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Jan 2021 21:38:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1610487514; b=ok+4E3C5Hg69tsMorCYxBYl43Zq4NQGxIpEEK1ODZchP2b5pywZ92+xZOFyPvLtafbmxPJM5c5 c3oyy1syWJdgvW/h4MMb2W2YCxF1w8qTqyCn24gWuEywFVEV1BETyXZ8LbKURI5XUhpy1L8I7Y pxoHiqiIVE0g7thHB75DohsAfsr5cBYkG76FQ22wj5nXv/C4SERcc1peAkATB68dsN9KesgtlB xU9xgqbeUSLvVH2AAvZ2mBzEL5Hv1Whxa6OjR7AY+NnzavoJKMc7gRrmq0te4TxsDA2ZXb3cik ss6jlrT/WmRuxsHuz+XtBFm9sZczvTg4T5VE8qghaADYqQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f53.google.com) smtp.remote-ip=209.85.166.53; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1610487514; bh=4q2j7HekvDm832WGhtnpYK3tMj7AcMxOHNXgpA+7N+E=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:References: In-Reply-To:MIME-Version:DKIM-Signature:DKIM-Signature; b=E5BJbJiVJJwD6CE9GI/ckD5zzcs5U/8AwKxNPPO6uKhHt3DjtqprTGIV7aoUePX+bY/b66yTFS 5iqsyMCdgL9D6ofbuJqVgE7PNOoLqP5x90IsPukxIdu4SW2NcoMSuGk8MPWK+zDuzb4zhhSbc4 DFsPl17fVz+Ke2GS3kCojfCkddJdLIzJeYrvzRanD3/5m9b/+Ebo2a7jy5g2LwRq6W7xuzlaSI aw76UEr4RnaHXOdIjjDIkf+RsxbtW9Y27E2gHKXqh33GCPViEsbOLTw/J58tcD0N6O6cUsl7VS UNg/nm61mplKO0F7+RmfvH+i4/gJABn5NbDobrrPiIdvTw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:References:In-Reply-To:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=aZfgiThr+terp0nU+lxtV3SaG9rSBu5MxwGzv0/4nDk=; b=eXUXY1NA+IdQSR0+2TUT3ldt/9 Sq7sEhA25kxRah3nUbFAWlkWeTLk5ktDDBt9OPVJgHEJ0FhOLeEXOv8eyGcdbYqywX/6weFgr/064 Zo79qVqOXI5k2W4Me2J2MPHQe466M7PhfYXaSyPxZQFWaumGwInHqn5g5w81bcwsu8gwr4qPkBNv6 IID5Le7Wqxc8ajn53wXYAjm4DTv4cnwlbWztBG3rq7OrNSTRBvN6o3uDhUfzi0sYKp/hph+Yq7RPZ ekEzvJvpjDqJ3i6wlB3Ug42cf2FGFHNAdcGiz7YmBbgXD/6+p+HQsWS8Ihp9WFypN1uyLvSvE2anP L2RajddQ==; Received: from authenticated user by zero.zsh.org with local id 1kzRN2-0009cm-Uk; Tue, 12 Jan 2021 21:38:32 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f53.google.com) smtp.remote-ip=209.85.166.53; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-io1-f53.google.com ([209.85.166.53]:38650) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kzRMj-0009U6-PL; Tue, 12 Jan 2021 21:38:14 +0000 Received: by mail-io1-f53.google.com with SMTP id e22so7320263iom.5 for ; Tue, 12 Jan 2021 13:38:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aZfgiThr+terp0nU+lxtV3SaG9rSBu5MxwGzv0/4nDk=; b=Ew7lm9RsLHYFjcT73s6rU21vcpi42tLEBo6MnieHE1xvbYcQF9Wi4kp8Cc3a+xvkvN B3A23ypRve87KGe2bGKpnrZ8XeGlfjAGSWBaBw6xYqn8+osYrKg5YSz1evdE50ngXlXP 2aiCiQ/JeTct7mW0jF9XJV8yjlaEazmvs/Qgz7Ck5JwdBbLHwXtgTAWvll+SaVce+Euq lF1bin6XspNp52z+yVt3ClVlNQfDHSqj86sMeWrMvY5L2r9vKlRZ038WiI7xeKVlC4Sk PA3OnfSZSZEXBpsmWtZYKQ2pxezM2Ef/eULOOIRF/FN3ZZFszEzMr6wXNHKYw++TrLiP 9j/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aZfgiThr+terp0nU+lxtV3SaG9rSBu5MxwGzv0/4nDk=; b=oLzjPEPzv+557adTdZLLB44NVNzzFMVJg2ywTq3f0RrSsiIMP9ydSUTg7ECKJL89EZ UElVxJkUiqshZY4Gmp6q9Brt+/7nMIm78I8E6VoZ92Fzy4s/FtHpQCsH2Wtv3YtVQD+M DaZeG963Rv5fSfpevdBBVbAGd/SwtF0hBJt9MJQjIDUPIpIN+hQ8o5DG0vuX4KhssyoG gUqnnXZl6pOujC9XIz89jdkwXo3myJTgNFgKBdPLCcMbIzAdtmnGuobRGEPs4STf8JnI MKKxJJScAXR3oyTQw9K17e34naR2Ukk7iCg0+8IogkF0n4t2Mc68q9EdJ0HmN5lvNb4g xwkg== X-Gm-Message-State: AOAM533esnUyg+Bh4Ogt0Iz9aaD4XP24vKgoDUO6diZNgwXv/gJzxftQ nlF0a0dAkHoLc0b44F/V6U+aXoMth1dBfCxZAc0= X-Google-Smtp-Source: ABdhPJwPSw0PZInFAR1vCFjUoTIX6jehCv891mLlIE4LbLQY8iZmrozv3ktmmmncp2v+xNgEfVKcmQouaNFMzhHbnco= X-Received: by 2002:a5d:8405:: with SMTP id i5mr879391ion.164.1610487492227; Tue, 12 Jan 2021 13:38:12 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a4f:ac4a:0:0:0:0:0 with HTTP; Tue, 12 Jan 2021 13:38:11 -0800 (PST) In-Reply-To: References: From: Mikael Magnusson Date: Tue, 12 Jan 2021 22:38:11 +0100 Message-ID: Subject: Re: Issue with permissions and case-insensitive globbing To: Devin Hussey Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 47811 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On 1/12/21, Devin Hussey wrote: > Case insensitive globbing will not work at all if any of the parent > directories of the target folder are inaccessible. > > This bug makes zsh very unstable on Termux (a Linux environment for > Android), as scripts which use "~/..." will immediately show no > results. > > Android's directory structure makes it so apps can only access their > /data/data subfolder, blocking access to /data/data itself (it will > return EACCES). > > Termux's $HOME is /data/data/com.termux/files/home. > > The simplified folder setup is this: > > root root 0700 / > root root 0700 /data > root root 0700 /data/data > termux termux 0700 /data/data/com.termux > > A (possible) fix for this issue would be to start in the "base" > directory before any opendir() calls instead of starting from the root > directory, and checking for errno. > > See: > > - https://github.com/sorin-ionescu/prezto/issues/1560 > - https://github.com/termux/termux-packages/issues/1894 I can only reproduce this with absolute paths, which will obviously not work (there's no way it ever could, as the kernel will not let you open the directory). It seems to be completely independent of case sensitivity as well. Using a relative path should work fine. To expound a bit, % mkdir inaccessible; cd inaccessible % mkdir a; cd a % chmod 000 .. # make inaccessible inaccessible % touch a b c; echo * a b c % echo $PWD/* zsh: no matches found: /tmp/inaccessible/a/* (you will get the same result in any other shell (some may echo the path with the * unexpanded)). -- Mikael Magnusson