javascriptphprootsudogeany

Run Geany as root


I have ubuntu 16.04 and I installed Geany using Ubuntu Software Centre. I need to edit some php and js files which happen to be in root directories. So when I try to save the changes in Geany, it generates following error:

Error opening file '/var/www/html/project1/team/team.php': Permission denied

The file on disk may now be truncated!

How can I make Geany to edit and save these files?


Solution

  • try

    gksudo geany
    

    Use gksudo with graphical apps written in GTK+ instead of sudo