Opened 7 years ago
Closed 7 years ago
#14029 closed bug (fixed)
[File Copy Operations] Copied files from RO USB to RW USB are RO (Read-only)
Reported by: | al_xv | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | File Systems/FAT | Version: | R1/Development |
Keywords: | file permissions | Cc: | |
Blocked By: | #10796 | Blocking: | |
Platform: | x86 |
Description
I copied 10 files from a Read-Only USB HDD to a Read-Write enabled USB flash drive. I didn't notice right away in Haiku, but upon inserting the Flash drive into a Linux machine, I noticed all files I copied had Read-Only permissions (locked file icon overlay). File permissions can be corrected manually.
Steps to Reproduce:
- Mount a USB drive as Read-Only.
- Mount a 2nd USB drive as Read-Write
- Copy files from RO drive to RW drive.
- Checked copied files permissions
Result
Copied files are all Read-Only
Expected Result
Copied files match original permissions regardless of media Write permissions.
This seems like a logical result since the files are copied from RO media... however, the source files themselves are not RO, so this behavior is undesireable.
Change History (14)
follow-up: 2 comment:1 by , 7 years ago
comment:2 by , 7 years ago
Replying to diver:
What filesystem it is?
The Read-Only was FAT32 and NTFS (I actually copied files from 2 drives) The Read-Write drive was FAT32
comment:3 by , 7 years ago
Component: | File Systems → File Systems/FAT |
---|
follow-up: 12 comment:5 by , 7 years ago
It may not even be a haiku problem, but a linux one, i've had the same behabiour in linux where haiku wasn't even involved, my guess is it's linux or/and xfce bug (if you're using this combination? ).
Did you check the pemissions of these files in haiku?
I'd suggest you retry the operation and check the permissions in haiku before anything else.
comment:6 by , 7 years ago
Blocked By: | 10796 added |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
See #10796
comment:7 by , 7 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Forgot we need to check if the FAT file-system add-on changes permissions when mounting read-only.
comment:8 by , 7 years ago
It seems it does change the permissions on the fly:
https://git.haiku-os.org/haiku/tree/src/add-ons/kernel/file_systems/fat/file.c#n174
https://git.haiku-os.org/haiku/tree/src/add-ons/kernel/file_systems/fat/file.c#n46
comment:9 by , 7 years ago
and the NTFS addon does the same: https://git.haiku-os.org/haiku/tree/src/add-ons/kernel/file_systems/ntfs/fs_func.c#n852
comment:12 by , 7 years ago
comment:13 by , 7 years ago
Verrified fixed on hrev51847 liveCD. Confirmed with FAT32 to FAT32 file copy. Copied file permissions matched original file on RO drive.
What filesystem it is?