Author Topic: [Solved] permissions  (Read 217 times)

Offline alphaace

  • Sr. Member
  • ****
  • Posts: 310
[Solved] permissions
« on: February 07, 2013, 06:48:03 PM »
Hi,

After reinstalling pclos today to the latest version, I'm trying to get all my settings back.

While the /home directory is intact, I keep getting permission errors and that I am not the owner.

Is there a way I can set correctly all the permissions in /home correctly all at the same time?

Thanks,
Greg
« Last Edit: February 08, 2013, 08:56:51 AM by alphaace »

Offline xr200

  • Full Member
  • ***
  • Posts: 97
Re: permissions
« Reply #1 on: February 07, 2013, 08:58:45 PM »
for ownership, for a user named bill,

chown -R bill:bill /home/bill

will change all files in /home/bill to be owned and grouped to bill.   Depending on what's wrong
(who's the owner now), you might have to run it as root.

I'd try the chown first as you (not root) and if it succeeds, you're done.  If it fails you should see
the list of files that are wrong, and you can investigate them before su-ing to root to fix them.

For permissions, similarly, chown -R ... can be used to recursively change permissions, but you
have to decide what permissions you want.    For example, you probably want execute permissions
on your directories but not on all your files.

xr200

Offline alphaace

  • Sr. Member
  • ****
  • Posts: 310
Re: permissions
« Reply #2 on: February 07, 2013, 09:29:11 PM »
Hi,

I saw that my old UID was 500... so I logged in as root and did usermod -u 500. That should give me the same thing no?

Offline xr200

  • Full Member
  • ***
  • Posts: 97
Re: permissions
« Reply #3 on: February 08, 2013, 08:36:05 AM »
usermod will change the UID of the specified user only.  It won't do anything to files
owned by other users.   For example, if there were a file owned by "joe" in user
"bill"'s home directory, that file would still be owned by "bill" after you ran usermod.
If you ran chown, all files in /home/bill would have ownership changed to joe.

It sounds like your only problem was that your UID got changed, and running
usermod as you did is the best solution to that specific problem, AFAIK.

xr200

Offline alphaace

  • Sr. Member
  • ****
  • Posts: 310
[Solved] Re: permissions
« Reply #4 on: February 08, 2013, 08:55:21 AM »
Thanks, that's exactly what I needed. The username was the same before and after, just the UID changed. The permissions error seems to be fixed now.