You are not logged in.
Hello,
I want to accomplish an apparently trivial task: copy a file without copying the permissions.
I tried cp, cp --no-preserve=all and rsync. All commands preserved the permissions set with chmod.
How can I copy without the permissions (and use the default permissions as if the file was just created)?
Thanks!
Offline
What filesystem? And who owns whatever folder or drive you are copying to?
Offline
Source and destination are both ext4. Destination is my home dir, e.g. owned by my user. Source is an external drive, files are also owned by myself. Since the drive has been mounted by KDE / HAL / whatever, I think the ownership has been set by the mount command.
Offline
What do you mean by "use the default permissions as if the file was just created"??
Presumably you've changed the permissions of certain files. Once they are changed, they don't remember what the original permissions were. You'll have to manually set the permissions to what you want them to be.
flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)
Offline
I know this doesn't help, but I always leave a 4 gig partition at the end of all my external drives with FAT so I can easily copy files to it when I want to share with other people. I just don't want to screw up my permissions and chown'ing with root if I don't need to.
Offline