cosmo wrote:I've just added a new user using: useradd -s/bin/shell -p1234 -d/home/paul -m paul
I logged in as paul and downloaded a zip file onto the desktop. I then right clicked and choose Extract Here
It wouldn't allow it saying Error extracting files, /bin/gtar: Error working directory (or something similar, sorry have just shutdown PS3)
Thing is, I know the zip is working as I downloaded yesterday and it extracted fine but that was using the root account, so I'm guessing
it has something to do with the permissions for the new user?
*Just been on an checked, the error is:
"/bin/gtar: Cannot save working directory"
"/bin/gtar: Error is not recoverable: Exiting Now
any ideas anyone?
I'm not liking the syntax of your useradd command. Particularly the -d parameter. Generally you need a space in Linux after an argument. It might have created your user at the root of the drive - although it's probably fine.
Before we troubleshoot further, let me just rule that out. Log in with your new user, and from a terminal window, type this:
echo ~You should see something like "/home/paul". If not, try your command again, but with spaces after the argument.
So - my guess is that your /home/paul directory was created with root as the owner. The fix is most likely this:
- Open a terminal window
- switch to root with su -l
- move to the home directory with cd /home
- reassign the folder permissions recursively with chown -R paul paul
That ought to fix it, I think.
Cheers,
Paul