I want to copy a file/folder from another user's home directory to my home directory in Linux.
I cannot access his directory, because it says permission denied. I'm 100% sure that a file can be copied from another user's home directory, because someone has showed me how, but I have forgotten.
This is what I'm currently doing:
[my_user@server1 users]$ cp /users/other_user/file /users/my_user
cp: cannot stat `/users/other_user/file': Permission denied
[my_user@server1 users]$ mv /users/other_user/file /users/my_user
mv: cannot stat `/users/other_user/file': Permission denied
How can I do it?
sudo
beforecp
, you'll be asked for your password, if you have access tosudo
, you'll be able to do thatcp
.sudo
).