Skip to content

cd fails for directory without read permission, displays Permission denied #10432

Description

@TheJonny

cd or pushd into a directory without read permission (but with x permission) does not work in fish.

jonny@charon /> sh -c 'env HOME=$(mktemp -d) XDG_CONFIG_HOME= fish'
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
jonny@charon /> echo $version
3.7.1
jonny@charon /> ls -ld /srv
drwxr-x--x 1 root root 48 14. Jan 23:51 /srv/
jonny@charon /> cd /srv
cd: Permission denied: '/srv'
jonny@charon / [1]> bash
[jonny@charon /]$ cd /srv
[jonny@charon srv]$ pwd
/srv

This transscript was on archlinux. The same behaviour on debian stable with fish 3.6.0

it is possible to cd through the directory, if I have read permission in the target, e.g. cd /srv/www.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions