LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   move stuff owned by one user by another user (https://www.linuxquestions.org/questions/linux-newbie-8/move-stuff-owned-by-one-user-by-another-user-568695/)

Geminias 07-12-2007 05:32 AM

move stuff owned by one user by another user
 
Hi, my fingers are starting to hurt because of extraneous command lining. I'll probably be asking many similar questions over the next few days...

When I try to move files in the home dir of another user (non-root) to a directory for my current user it gives me permission denied. To solve this I've been su - "ing" to become root and do the work.

Thanks for any replies.

acid_kewpie 07-12-2007 05:36 AM

replies about what? that's correct... nothing wrong there at all. i could suggest sudo, but that will probably leave you with more keypresses, not less.

Wim Sturkenboom 07-12-2007 05:52 AM

Makes sense; you will really love it if somebody else moves your files :)

Owner has to set write permission (for users in the same grooup and/or for others).

briealeida 07-12-2007 06:02 AM

Don't see a question but the only thing that I can think of is . . . try moving folders instead of individual files, if that's what you need.

custangro 07-12-2007 10:35 AM

You can try to "pipe tar" the files over...as root:

Code:

# cd /some/directory
# tar -cf - . | (cd /destination/directory ; tar -xf -)

You have to remember that the "/destination/directory/" must exist before you preform the command, or the command won't work.


All times are GMT -5. The time now is 09:34 PM.