0

I have Ubuntu setup on a VM and want to edit some apache configs, but it's requiring that I am root. I can do this using 'sudo' in terminal, but I want to just edit by double clicking and saving - via the GUI.

Is there anyway to set privileges so I can do this?

Thank you!

2 Answers 2

2

You should add your user to www-data on the server.

sudo usermod -a -G www-sata your_user

You then keep /var/www , and the files in this directory, owned by root:www-data

See also Set default owner/user

Then ssh in with the -X option

ssh -X user@server

You then edit with

gedit /var/www/file_to_edit

If you have ssh installed, you can mount files locally with sshfs. Permission denied on SSHFS automount

I think sshfs will most easily give you the functionality you want ;)

From windows you can use winscp.

1

If you can use sudo in a terminal, you can use gksu for a GUI editor, e.g., "gksu gedit". If the file permissions require root access, that is what you will have to do. On the other hand, if the file permissions do not require root authority to write them, you can just run, e.g., "gedit".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .