Permission Denied - How to surpass this issue?
Excuse me if I am posting on an already said topic. I am new to these forums as of 2 minutes ago and could not find anything relative to my issue. I am running Ubuntu 10.04 LTS with the latest version of FOG and the latest Kernel as of this very moment.
My issue is this:
When I want to make a change, to say [B]config.php[/B] located at [B]/var/www/fog/commons[/B], I am required to make the change via terminal with the [I][B]gksu gedit [/B][/I]command. If and when I try to access the file to edit, I am blocked due to permissions. In some cases I cannot even do this because I am blocked from the folder entirely.
I have re-installed FOG about 5 times due to messing things up :p I have done [B]chmod 777[/B] on the directories before but I believe it messed things up (though I don’t remember). I have changed the fog user password on the Ubuntu OS using [I]‘sudo passwd fog[/I]’ command. but that REALLY messed things up.
I was wondering if there was an easier way around this? I see forums posts about people editing config.php or MultiTask.class.php (both of which Id like to configure) without ever stating how they do it.
My main purpose is to try and make sure I am running in Full Duplex mode but also have control of these files for editing.
Any help would be great!
install webmin on your Ubuntu Server
joshua last edited by
try [B]ls -al [/B] it will show all details and hidden files
[S][B]ls[/B] allows me to see the contents. Thank you! Exactly what i was looking for :) lol[/S]
Scratch that! I am getting an access denied message. How do I see the contents of these FOG owned folders? [S][/S]
This post is deleted!
joshua last edited by
Sudo – means superuser ‘DO’. As in “run as administrator”.
not sure what you mean by “command is useless if I don’t know whats in directories”.
try the [B]ls[/B] command. (as in [B]l[/B]i[B]s[/B]t)
You must be new to linux commands… Take things one step at a time and you will be familiar in no time.
VI - a really basic text editor.
How to edit text?
use arrow keys to move up,down,left,right…
when you get to where you want to make a change, press the insert key on the keyboard. this will put you in INSERT mode. This will allow you to delete, backspace and change text to your desire.
When you are all done, just press escape. This will escape INSERT mode.
You can move the cursor somewhere else now and edit it (by hitting INSERT again).
All done? well to save your file you need to NOT be in insert mode, and press : (yes a colon. so you will have to hold shift and press the : key)
now you will see the colon appear at the bottom of your screen.
now what? Type in one of the following to perform an action.
w = write
q = quit
! = force
so to save and exit you have to type this
Hope this proves useful.
EDIT: from Zardans suggestion – Nano is for GUI… which is not always available. VI is always available.
Right on! Thanks Zardan!
That does work however, with this being said, how can I view the contents of a folder with sudo privileges? This command is kind of useless if I don’t know what’s in the directories! Lol
Zardan last edited by
I have always used “sudo nano -w /var/www/fog/commons/config.php” to edit files without any permission issues.