Preserve permission switch not working with cp?
- by Ankit
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?