New User permissions

If you are new to YDL and have some more or less basic questions.

New User permissions

Postby cosmo » 04 Aug 2009, 10:54

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?
cosmo
ydl newbie
ydl newbie
 
Posts: 8
Joined: 01 Aug 2009, 23:56

Re: New User permissions

Postby ppietro » 04 Aug 2009, 21:46

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
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Re: New User permissions

Postby cosmo » 04 Aug 2009, 21:54

Paul, your a genius.

did what you said, and the file extracted straight away

Many many thanks for your time!
cosmo
ydl newbie
ydl newbie
 
Posts: 8
Joined: 01 Aug 2009, 23:56


Return to Beginner

Who is online

Users browsing this forum: No registered users and 39 guests

cron