Changing ownership for a hard disk

I have the exact same problem.

I wrote, sudo chown -R root:myusername pathtofolder and the command appeared to execute without error, but when I go to the desired directory it’s still registered to root.

1 Like

Why did you modify that command like this? Read the answers again and follow what is said.

Try to figure out why now, the answer to this is in your modified command.

1 Like

@omano

I’ve read the answers. I can’t tell what you’re getting at. Can you be specific?

Edit: perhaps you mean that eugen-b’s username:group refers to the username and group of the target owner, rather than the username of the original owner and the group of the target owner, as I originally thought based on pebcak’s $USER:$USER. But writing sudo chown -R myusername:mygroupname /path also leaves the owner as root.

To be specific the answers above give you specific command, you modified the specific command and wonder why it doesn’t do what it is supposed to do.
So read the replies, apply what is explained.
If it doesn’t change ownership after issuing the proper ownership command, then you’re not issuing the proper ownership command, or keep secret output of error messages, or there is something you didn’t explain yet about your disk/folder.

A small tip:
If you use chown or chmod it is often usefull to use the option -c (or -cR). Then you will see what happens, and you will see if nothing happens at all. (maybe then the command or the options or the path was not right)

I always use this option :sunglasses:

1 Like

@andreas85

Thanks, I’ll give that a try.

@omano

You seem to be being intentionally unhelpful. The commands contain ambiguities, at least to my relatively inexperienced eyes, which are reflected in my attempt to adapt the general case to my specific case. If it were as clear to me as it is to you, I wouldn’t have posted a question.

At any rate, I’ve now changed ownership of the folder as desired, using a degree of trial and error.

I don’t think I was. Command was almost copy/paste command (just needed to put the proper path), you intentionally went out of the explanations and wondered why it was not working. You apparently managed to apply the command now, good for you.