Changing userrights for many files & folders at once SOLVED

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
hamburn

Changing userrights for many files & folders at once SOLVED

Post by hamburn »

after installing Gloria, I have a problem. I have backuped the files and folders of my home folder of Felicia on an external hard drive. When I tried to copy them in my home folder of Gloria I couldn't do it as user hamburn, but only as root. Now they all belong to root, even if they belong to user hamburn on the external drive. I can see there is an ability to change the owner-rights of the folders, but it don't work for the the files inside, too. I have tried the methods I know to change that, but the only method that works is by doing that file by file, even it looks as if there is an ability in properties of the folders. It doesn't work..
Nearly seventy folders with nearly six thousand files, it will be hard work to do so.

Last chance I can see is, to change the owner of my files by the command line.

Can somebody tell me the commands I need to get my folders and files back, please.


thanks
H.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Fred

Re: Changing userrights for many files and folders at once

Post by Fred »

hamburn,

The command you are looking for is:

sudo chown -R fred:fred /home/fred/Data

Correct for your user_name of course. Also, the last part of the above command is the path to the folder tree you wish to change. It depends upon where the partition is mounted as to what it might be. It might be in /mnt, /media, your /home, or elsewhere.

Fred
hamburn

Re: Changing userrights for many files and folders at once

Post by hamburn »

Fred thank you very much. That command has done it's magical work ;-). You saved my #ss. There are ten people, I have persuaded to use Mint instead of that Redmond OS. Now I can change their computers happily to it.

Thanks again

H.
emorrp1

Re: Changing userrights for many files & folders at once SOLVED

Post by emorrp1 »

As usual the command-line is the easiest option, however in this specific case there is a way to do it graphically too (for anyone else with the same problem):
Right Click --> Properties --> Permissions --> Apply permissions to enclosed files (or something like that)
hamburn

Re: Changing userrights for many files & folders at once SOLVED

Post by hamburn »

Right Click --> Properties --> Permissions --> Apply permissions to enclosed files (or something like that)

As I had mentioned in my first posting: the graphically way don't work in Gloria for me. Being not a friend of the command line, I had used the graphically way since mint 4, and so I tried it now again. But it looks like it is disabled by default in Gloria.

But thanks for your answer.

H.
emorrp1

Re: Changing userrights for many files & folders at once SOLVED

Post by emorrp1 »

hmmmm, that's strange, I just tested it now, it works fine for me in gloria.
Fred

Re: Changing userrights for many files & folders at once SOLVED

Post by Fred »

hamburn,

Don't underestimate the simplicity and flexibility of the CLI in Linux. It is a powerful feature in Linux that isn't even remotely comparable to the CLI in Windows. In Windows it is seldom used because it is so clunky and crippled.

Just remember the old saying; "Anything you know is easy, anything you don't know is hard."


@emorrp1,

Look at the thread below. :-)

http://forums.linuxmint.com/viewtopic.php?f=90&t=26371

Fred
hamburn

Re: Changing userrights for many files & folders at once SOLVED

Post by hamburn »

(...)Don't underestimate the simplicity and flexibility of the CLI in Linux. It is a powerful feature in Linux (...)
Have seen that Fred, thanks to you. 5575 files at once.... Now I have to get a reference, to learn the other commands. :lol:

H.
Locked

Return to “Beginner Questions”