
Sometimes you’ll notice that one of your files has a lock icon next to it. This usually means that for some reason, you are no longer the owner of the folder/file.
This can happen for a variety of reasons, but it’s fairly easy to correct, albeit a real nuisance sometimes. Here are a list of commands to take back ownership of just about any folder or file on Ubuntu.
Note about the examples and commands below:
Command: sudo chown USERNAME:GROUP /LOCATION/OF/FOLDER
Example: sudo chown randy /home/randy/Desktop/Delete\ Me
Command: sudo chown -R USERNAME:GROUP /LOCATION/OF/FOLDER
Example: sudo chown -R randy /home/randy/Desktop/Delete\ ME
Command: sudo chown USERNAME:GROUP /LOCATION/OF/FILE
Example: sudo chown randy /home/randy/Desktop/myfile.jpg
Command: sudo chown USERNAME:GROUP file1.jpg file2.htm file3.png
Example: sudo chown randy image1.jpg index.htm bob.png
Related posts:
Related posts brought to you by Yet Another Related Posts Plugin.