Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: lsd -al - Operation not permitted (os error 1). #1078

Closed
stivens13 opened this issue Aug 2, 2024 · 6 comments · Fixed by #1097
Closed

[Bug]: lsd -al - Operation not permitted (os error 1). #1078

stivens13 opened this issue Aug 2, 2024 · 6 comments · Fixed by #1097
Labels
kind/bug Something isn't working priority/high

Comments

@stivens13
Copy link

stivens13 commented Aug 2, 2024

  • os: MacOS 14.5 (23F79)
  • lsd --version: latest - 1.1.2
  • installation: brew install lsd
  • echo $TERM: xterm-256color
  • echo $LS_COLORS: empty
    No other environment variables present for either ls or lsd
lsd config content ~/.config/lsd/config.yml
# == Classic ==
# This is a shorthand to override some of the options to be backwards compatible
# with `ls`. It affects the "color"->"when", "sorting"->"dir-grouping", "date"
# and "icons"->"when" options.
# Possible values: false, true
classic: false

# == Blocks ==
# This specifies the columns and their order when using the long and the tree
# layout.
# Possible values: permission, user, group, context, size, date, name, inode, links, git
blocks:
- permission
- user
- group
- size
- date
- name

# == Color ==
# This has various color options. (Will be expanded in the future.)
color:
# When to colorize the output.
# When "classic" is set, this is set to "never".
# Possible values: never, auto, always
when: auto
# How to colorize the output.
# When "classic" is set, this is set to "no-color".
# Possible values: default, custom
# When "custom" is set, lsd will look in the config directory for `colors.yaml`.
theme: default

# == Date ==
# This specifies the date format for the date column. The freeform format
# accepts a strftime like string.
# When "classic" is set, this is set to "date".
# Possible values: date, locale, relative, '+<date_format>'
# `date_format` will be a `strftime` formatted value. e.g. `date: '+%d %b %y %X'` will give you a date like this: 17 Jun 21 20:14:55
date: date

# == Dereference ==
# Whether to dereference symbolic links.
# Possible values: false, true
dereference: false

# == Display ==
# What items to display. Do not specify this for the default behavior.
# Possible values: all, almost-all, directory-only
# display: all

# == Icons ==
icons:
# When to use icons.
# When "classic" is set, this is set to "never".
# Possible values: always, auto, never
when: auto
# Which icon theme to use.
# Possible values: fancy, unicode
theme: fancy
# Separator between icon and the name
# Default to 1 space
separator: " "

# == Ignore Globs ==
# A list of globs to ignore when listing.
# ignore-globs:
#   - .git

# == Indicators ==
# Whether to add indicator characters to certain listed files.
# Possible values: false, true
indicators: false

# == Layout ==
# Which layout to use. "oneline" might be a bit confusing here and should be
# called "one-per-line". It might be changed in the future.
# Possible values: grid, tree, oneline
layout: grid

# == Recursion ==
recursion:
# Whether to enable recursion.
# Possible values: false, true
enabled: false
# How deep the recursion should go. This has to be a positive integer. Leave
# it unspecified for (virtually) infinite.
# depth: 3

# == Size ==
# Specifies the format of the size column.
# Possible values: default, short, bytes
size: default

# == Permission ==
# Specify the format of the permission column
# Possible value: rwx, octal, attributes (windows only), disable
# permission: rwx

# == Sorting ==
sorting:
# Specify what to sort by.
# Possible values: extension, name, time, size, version
column: extension
# Whether to reverse the sorting.
# Possible values: false, true
reverse: false
# Whether to group directories together and where.
# When "classic" is set, this is set to "none".
# Possible values: first, last, none
dir-grouping: first

# == No Symlink ==
# Whether to omit showing symlink targets
# Possible values: false, true
no-symlink: false

# == Total size ==
# Whether to display the total size of directories.
# Possible values: false, true
total-size: true

# == Hyperlink ==
# Attach hyperlink to filenames
# Possible values: always, auto, never
hyperlink: auto

# == Symlink arrow ==
# Specifies how the symlink arrow display, chars in both ascii and utf8
symlink-arrow: ⇒

# == Header ==
# Whether to display block headers.
# Possible values: false, true
header: false

# == Literal ==
# Whether to show quotes on filenames.
# Possible values: false, true
literal: false

# == Truncate owner ==
# How to truncate the username and group names for a file if they exceed a certain
# number of characters.
truncate-owner:
# Number of characters to keep. By default, no truncation is done (empty value).
after:
# String to be appended to a name if truncated.
marker: ""

More on system:
System Information 2024-08-01 19 46 43

Expected behavior

ls -l, ls -Al and ls -al run successfully in root, .ssh, and user-created dev dirs
(Note command is just to escape ls alias to lsd in fish shell)

Google Chrome 2024-08-01 20 09 15 Google Chrome 2024-08-01 20 09 30 image image

Actual behavior

lsd -l, lsd -Al and lsd -al fail with Operation not permitted (os error 1) and Permission denied (os error 13) in different directories but have mixed fail logic.
(Tested in Warp, iTerm2 and mac built-in Terminal apps, in fish and zsh shells)
(RUST_BACKTRACE=1 lsd ... produces same result)

lsd -l, lsd -Al and lsd -al fail in root dir
image
Google Chrome 2024-08-01 20 10 52
Google Chrome 2024-08-01 20 15 41

lsd -al fail in .ssh and dev directores
Google Chrome 2024-08-01 20 03 25
Google Chrome 2024-08-01 20 21 32

However, lsd -l and lsd -Al do not fail in .ssh and dev dirs
image
Google Chrome 2024-08-01 20 19 14
Google Chrome 2024-08-01 20 24 33
Google Chrome 2024-08-01 20 24 39

In addition

Running lsd in iTerm and Terminal called access prompt on various resources like below, including Full Disk Access. Even after accepting all of them, lsd still fails the same way as it does in Warp
UserNotificationCenter 2024-08-01 19 50 13

@AdityaMisra
Copy link

Even I'm facing the same issue.

@zwpaper
Copy link
Member

zwpaper commented Aug 13, 2024

get it, it should be because of the total-size enabled, I will look deeper into it.

currently, you can try to set the total-size to false

/kind bug
/priority high

@muniu-bot muniu-bot bot added the kind/bug Something isn't working label Aug 13, 2024
Copy link

muniu-bot bot commented Aug 13, 2024

@zwpaper: The label(s) priority/high cannot be applied, because the repository doesn't have them.

In response to this:

get it, it should be because of the total-size enabled, I will look deeper into it.

currently, you can try to set the total-size to false

/kind bug
/priority high

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@zwpaper
Copy link
Member

zwpaper commented Aug 13, 2024

/priority high

@stivens13
Copy link
Author

get it, it should be because of the total-size enabled, I will look deeper into it.

currently, you can try to set the total-size to false

/kind bug /priority high

The total-size fix works, although, I'd like to keep it enabled. Is there a roadmap for the fix or it's a weird problem requiring a lot of time?

@zwpaper
Copy link
Member

zwpaper commented Sep 28, 2024

I have raised a PR for this #1097, will also create a new release after it merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants