Root privlidges folder 27 October 2022, 01:27:14 I'm trying to make a cli script but I can not get into /etc/wireguard. It says permission denied. I thought you could get into anything with sudo. Things I've tried.Running sudo cd /ect/wireguardRunning sudo usermod -a -G root michael
Re: Root privlidges folder Reply #1 – 27 October 2022, 07:01:48 What are you wanting to do with your script ?The approach you may need to take is write your script and then run the script with elevated privileges. So (to run as root) Code: [Select]sudo MYSCRIPT or (as a specific USER) Code: [Select]sudo -u USER MYSCRIPTsudo cd won't work as cd is a command builtin to the shell, eg bash.sudo usermod -a -G root michael will add michael to group 'root' but that's not the same as full root privileges. Every file and directory has its own permissions and some don't allow even read access to group root.I would suggest removing yourself from group root as there are better ways to do this. And possibly security implications ?What is the output of Code: [Select]ls -dal /etc/wireguardAs a caveat:If you write a script and run it as root any mistakes you make can potentially damage your install.While you're learning be careful and consider testing things within a virtual machine. 2 Likes