I want to change the owner from root to user of a folder named $RECYCLE.BIN. I'm using ubuntu 16.04 LTS. I'm new to ubuntu.
Asked
Active
Viewed 323 times
2 Answers
0
This command will make the current user own the folder and all it's contents:
sudo chown -R $USER <your-folder-name>
Hope it helps!

Ollie
- 2,932
0
I'm quite curious why your recycle bin is owned by root, but I'll go ahead and give you the answer. Open a terminal with Ctl+Alt+T or by searching for it in your application screen. First navigate to the directory that the folder is located in (if it isn't just in the home folder, that is):
cd /path/to/directory
Next, all you should have to do is a simple chown command. The -R makes the command recurse into the folder so you transfer ownership of everything inside the folder instead of just the folder itself. If there is some reason not to do this, then simply exclude the -R modifier.
sudo chown -R $USER '$RECYCLE.BIN'
And that should really be it; the folder should now be owned by you.
-
@WinEunuuchs2Unix If
$REYCLE.BIN
is from Windows 10, then it could very well be that it is a Windows file, but OP asked how to transfer ownership in Ubuntu, so I gave Ubuntu commands. I'm guessing that if it's a Windows file, then it was likely just transferred over. Given that it's a recycling bin, I should have also showed OP how to usesudo rm -r
, but I commented that earlier, so I feel it would be redundant to add it, and anrm
command doesn't answer OP's question. – Jun 23 '20 at 01:29 -
@WinEunuuchs2Unix I have not indexed any Windows files, but if I run
locate RECYCLE
, it returns/home/$USER/$RECYCLE.BIN
. It's more likely than not that OP is looking at the Ubuntu recycling bin, and they've done something that restricted their recycling bin to root. In the slim chance that it IS from Windows 10, then the same command would work to change permissions, so I don't see what you're really getting at. – Jun 24 '20 at 03:12
sudo rm /path/to/recycle/bin/*
to permanently delete the contents. Obviously, you must fill in the proper path yourself. – user535733 Jun 18 '20 at 22:59sudo rm -R /path/to/directory/'$RECYCLE.BIN'
, though that's not the advice that OP was asking for. – Jun 18 '20 at 23:12