user3253191 user3253191 - 1 year ago 85
Linux Question

ubuntu backup-manager Permission denied

I've recently installed backup manager onto my ubuntu machine to have automated backup going. The problem is when I go to set up the automatization using this code -


it comes us up saying this "bash: /etc/ Permission denied"

I do not understand this error. I've tried change the user who read/writes to someone other than root and that didn't work. I tried changed the chmod number from 770 to 700 and still didn't work.

enter image description here

any info on this is welcome. Thank you to those who help :)
those wondering I am using this tutorial giving to me by the host.

I'm using the desktop version of ubuntu 16 incase that is needed

Answer Source

The sudo doesn't do what you want in this case. What happens is that the shell evaluates the redirection and attempts to open the /etc/ for you before the sudo cat even gets started. That fails because the shell still runs as you unprivileged user. You have to say sudo -i to open a new root shell, execute the commands and exit again. Alternatively you could try sudo nano /etc/ and paste the contents there. This would work because the editor is run as root and does the file opening itself when you save.