Open Linux Forums
Like Ubuntu forums, except with beer.
Member
Joined: Oct 26 2017
Posts: 487

One of my niece's came to visit me yesterday and as I was trying to make copys of old family photos I found all the old photos locked and I could not copy them. I went to permissions and change it to read and write, that did not change anything still could not copy photos. does anyone have an idea how to get around this locked program?

dinga

Administrator
avatar
Joined: Jan 06 2018
Posts: 1718

Best guess is that you don't "own" them anymore. In other words, you put them in your computer under a different user name

I'll post a fix in a few.

Administrator
avatar
Joined: Oct 04 2017
Posts: 396

Try something like the following command:

sudo chown -R $(whoami): /path/to/locked/pictures

The command should set your user as the owner of the files, making it possible to access them freely again.

Administrator
avatar
Joined: Jan 06 2018
Posts: 1718

I think it needs to have usergroup in there as well.

sudo chown -R username:usergroup /path/to/locked/pictures

Obviously, the username:group needs to be changed to reflect your actual username. Normally, in your case, these should be the same.

Administrator
avatar
Joined: Oct 04 2017
Posts: 396

warfacegod wrote:

I think it needs to have usergroup in there as well.

sudo chown -R username:usergroup /path/to/locked/pictures

Obviously, the username:group needs to be changed to reflect your actual username. Normally, in your case, these should be the same.

That's where you go wrong.
The following command:

chown <username>:

Takes the primary group of the userid and sets that as the groupid value.
Without the colon, it will only set the userid.

Administrator
avatar
Joined: Jan 06 2018
Posts: 1718

Fine. You can out geekspeak me. The way I postedit has always worked for me. ...And that's the way I learned it from you. :P

Administrator
avatar
Joined: Oct 04 2017
Posts: 93

Hmm, I didn't know there was a shorthand like that. I thought you had to either specify the group name or not set it at all.

Also of note: you can use a dot instead of a colon, so if your local manpage recommends that, either form should work.

Member
Joined: Oct 26 2017
Posts: 487

I spent 3 hours last night working with this kept getting invlaid options. from terminal help I went to:
www.gnu.org/software/coreutils/chown
where it (if I understand what it said) to use -h instead of -r this got me to path which I entered like this:
/home/pictures/childhood/locked/ and /home/pictures/childhood/
and I get from both no such directory found. I must be doing some thing wrong on the path. I will now go look up paths and try to learn something.

Administrator
avatar
Joined: Jan 06 2018
Posts: 1718

You forget to put your /home/username/ into the file path?

Administrator
avatar
Joined: Oct 04 2017
Posts: 396

warfacegod wrote:

And that's the way I learned it from you. :P

Doubtful as I've been using the short version for quite a few years now...