So i ran into an issue and i needed to rewrite a file taht was in ETC file folder and the system wasn't allowing it. I claimed the whole ETC folder.. the file wrote fine after that. Now as i am using sudo it says there needs permission granted from the Pi user to use the command. And other commands are completely shut off. Like now i need to rewrite a file in the /boot directory and i am unable to sudo change ownership of that boot directory becuase Pi user owns it.
So now i'd like to revert ownership of ETC folder back to root.. because ETC folder houses all the sudo profiles, so sudo is offline. Then i'd like to go into a user that can read and write any file on the computer. I need to be done with claiming file folders, otherwise i forget the folder is claimed/dont know how to unclaim it.. any and all suggestions welcome to resolving this issue.
Changing file permissions back so root owns the ETC file folder and granting system wide access to my user/using a user that has systemwide access. All i have found so far is systemwide access through the terminal. I need systemwide access throughout all the filefolders and the desktop
sudo chown -R pi:pi /boot/config.txt
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo chown -R pi:pi /boot/config.txt
is impossible, because it is a FAT partition which doesn't support permissions. Your best option is to restore from your backup.