`install -D file /file` fails and loses the file when the destination's parent is /
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Bắt đầu từ cách lệnh install xử lý tùy chọn -D và tái hiện vấn đề bằng install -D -m755 file /file. Xác minh rằng tệp nguồn vẫn còn khả dụng, /file được tạo và mode của nó là 0755, khớp với hành vi của GNU install.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When the destination of install -D is a single-component absolute path (i.e. its parent directory is the filesystem root /), install fails with a chmod error and does not produce the destination file. GNU coreutils handles this correctly.
Steps to reproduce
ubuntu@resolute-racoon:~$ ls
folder file
ubuntu@resolute-racoon:~$ install -D -m755 file /file
install: No such file or directory
ubuntu@resolute-racoon:~$ ls
folder
the file disappears and is not to be found even in /file.
Environmnet
ubuntu 26.04
install (uutils coreutils) 0.8.0
Expected behavior
Per the GNU install(1) documentation for -D:
-D — create all leading components of DEST except the last, then copy SOURCE to DEST
For DEST = /file, the only leading component except the last is /, which already exists. install should simply copy file to /file and set mode 0755.
- Ngôn ngữ chính
- Rust
- Star
- 24.1k
- Fork
- 2k
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 371
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của uutils/coreutils
-
U - ls
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
U - ls
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
U - tr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
U - date
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
U - date
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Tất cả issue của uutils/coreutils
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
gitbutlerapp/gitbutler#15998 · 1 bình luận ·
-
bug triage:deciding
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
open-telemetry/otel-arrow#4132 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100