For JamRom2 - getting Jzintv up and running
-
I actually have all 3 now.
I installed Putty a while back and forget how I even used it. And I have an SD card reader. I backed up my build over a year ago but it is way outdated now. It's just kind of a pain because I have to open up my bartop, dig out the mini box the pi is in, and then remove the SD card and plug it into my laptop to back it up.
Is there an easy way to restore the usr folder to what it was before? I think that was the only file that was impacted by CHMOD. I'm pretty sure the local folder is the same it was before. I figured it would be easy to just remove what I originally added as permissions but that did not seem to work.
-
What did you try?
I would think it would be... sudo chmod -w foldername
So jump into \usr and try sudo chmod -w \local
That should take out the -write attribute of all files and folders in \local and under it as well. Then you can go back and add the -write attribute to only the \share folder in that same \usr\local\ directory.is \usr also 0777 as well?? If so, then change that as well, back to 0755.
I always open a Putty session and WinSCP side-by-side whenever I'm working with changing any folder permissions in my Pi. So I know what I did worked right away.
Also... Linux is not like Windows. There is NO warning questions... Are you sure?... bells.. .nothing. You type and hit enter, it's done. So always back-up before screwing with anything.
-
ok, here is the current deal.
usr is 0777
when I try to change /local and /usr in WinSCP I get a generic permissions denied error.
When I exit Emulationstation and run from the command line the error message is more specific:
sudo: error in /etc/sudo.conf line 0 while loading plugin "sudoers_policy"
sudo: /usr/lib/sudo/sudoers.so must be only writeable by owner
sudo: fatal error, unable to load pluginsso far, the only "problem" I encouter is when I shut down the pi. Rather than turn off, I get booted to the command line because of the same plugin error. The machine boots up just fine.
-
@miksarcade you can't change permissions in WinSCP. You can only view them because it doesn't use the "super user" sudo.
You have to change permission in a Putty session, or direct in command out of Emulation Station.
Did you try this command in Putty?
sudo chmod -w \local
This should remove the "write" permission from the "local" folder.
-
I will try the command using PUTTY.
It did not work when I did it from the command line after exited Emulationstation on the Raspberry Pi itsef.
-
@miksarcade I have another chip with an old image on it I can blow up and play with. I'll see what happenes and try to reverse it.
-
Yeah, I get same thing in PUTTY
I googled the error message and found this link, but I'd rather wait for your advice....thanks
https://askubuntu.com/questions/234603/how-do-i-deal-with-sudoers-so-must-be-only-be-writable-by-owner -
@miksarcade
Yeah.. not sure what that is, but reading it... might have to go that route.So here is what I did. I set the /usr/local folder to open 0777 then returned it back to normal as you can see below.
Try this command in the /usr .
The command is sudo chmod ugo-w /usr/local
You should see the /local folder go back to a blue color. The move back to the root and try that some command on the /usr folder by removing the "/local" from the command.
-
yeah, same error. My usr folder is also drwxrwxrwx
it says only the owner can writeable by owner.
when I connect, i use the username = pi and password = raspberry
Is that like the default owner account? It is not the password I set up originallly, and now I can't connect to that other pi user I set up.
Also, I what is difference between sudo chmod and just chmod? Is it possible that it is failing the "sudo" part and just running as chmod?
Honestly, I'm just lost on this whole process now. I don't even remember what state these folders/files need to be in.
At the root/top level, there is now a green file called tmp that was created on 12/22 and it is set as drwxrwxrwt
so the green files at the top of the path are:
tmp = drwxrwxrwt under tmp is some private thing I don't know what it is
usr = drwxrwxrwx
under usr, there are 6 files with the same setup as usr (games, include, lib,sbin, share,src)
oddly enough, local is set as d-wx-ws--x (I think that is different than before)My whole game systems runs fine, but some of the retropie commands no longer work, such as "Show Ip" aka > ip addr show
-
@miksarcade yes, that's the default admin user.
pi/raspberry
I tried the original command again, and it worked. you can see it below.
So I'm not sure what happened... all that command does is open the /usr/local/share to be written to by all users. None of what you have should be happening. Did you do any other commands? That string only points to 1 folder. If you went and unlocked all the others... then yes, it will blow up for sure. /usr should not be unlocked.
-
honestly, I think the problem is that "sudo" does not work.
I just type sudo and hit return and I get the same error
this started when I typed this in:
sudo chmod -R ugo+rw /usr/local/share
It was the ONLY thing I did...
scratch that....it looks like I did THIS:
. I was able to use CHMOD on the usr folder, but something broke.
sound like this was a bad thing....
-
@miksarcade yup.. and I hate to say it. Your build is flogged.
I can imagine how this happened, but there is no simple way to bring it back. I've been reading about this all morning. Not easy and outside of my skill with Linux. I've had this happen in the past, with either commands, or building emulators, breaking SD cards, etc.
Hence why it's very important to have a build back-up.
So... thinking you're on your own and screwed? No... not at all. Where did you get the build? Byte Knight or is this your own from scratch?
-
@miksarcade yes... a very bad thing.
Basically using that command on anything other than what I posted ... well.. .really on the /usr folder... knocks out control of the /usr folder by sudo.
It's only meant to be used to unlock the specific folder I had it pointed to, that's all that was needed.
-
ah, what a bummer. You are not kidding when you say it is easy to break. sadly, I have no idea where the build originally came from.
I bought it from a guy on craigslist a couple years ago and just added a boatload of games, added a music soundtrack and didn't do much else. The only times I have played at the command line was getting the music player to work and to get the PC port of Bomberman's Streets of Rage Remake to work. For the most part, I just transfer ROMS and images, and edit the gamelist and emualator.cfg files to clean them up.
So, is the MAIN problem here that the USR folder is set to drwxrwxrwx ? (7770?) What does that need to be? I guess I will just have to try to find another way to get that back to normal? Or, is there any way to just redo the build without wiping all the games?
-
Hit me with a PM on AA.
-
@jamrom2 Yes. Once sudo is removed from a root folder... it's done.
You basically open the folder to everything. Which looses control of sudo. Without sudo, you have no way to set permissions.
It's possible to boot into root and try to fix it, but the time and effort is usually not worth it with how quick you can get another build up and running.
So, while I talk to you on AA for one solution... the other can be that you copy everything in the BIOS, ROMS, theme, and .emulationstation folder over and start the process of rebuilding.
There are other files as well... but that's normally where it all starts.
-
I can check my old build. If it has the music player and Streets of Rage, then all it will be missing is the new games and systems I set up and all I will need to do is dump the missing ROMS, images and update game lists, emulators.cfg and whatever file stores the retroarch settings
-
according to some googling, I can use pkexec in place of sudo with chmod to fix the folder. What do you think?
https://itectec.com/ubuntu/ubuntu-sudo-not-working-after-changing-the-permissions-of-usr-directory/
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.