Preserve permission switch not working with cp?
Posted
by
Ankit
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Ankit
Published on 2012-09-28T03:47:46Z
Indexed on
2012/09/28
3:49 UTC
Read the original article
Hit count: 264
permissions
Copying file from other user's directory with '-p' switch should reserve the permission as per the man page.
I am copying /etc/passwd to my home directory with -p switch but the permissions aren't preserved as follows:-
ijoin@stream:~$ ls -l /etc/passwd
-rw-r--r-- 1 root root 1813 Sep 25 08:58 /etc/passwd
ijoin@stream:~$ cp --preserve /etc/passwd .
ijoin@stream:~$ ls -l passwd
-rw-r--r-- 1 ijoin ijoin 1813 Sep 25 08:58 passwd
I am doing something wrong?
© Ask Ubuntu or respective owner