Linux and file permissions - newb linux user

Hi Ive been googling around but cant get anything concrete on this.

Whenever I create a rails project or use a generate command I have to
use use the sudo command otherwise ubuntu complains about permissions.
However when I try to save some changes made to the files generated with
sudo in my editor (komodo) it complains i dont have permissino because
only the root has the permission to do so.

Ive read about chmod but im wondering is using it on the whole rails
project directory a smart thing to allow a user to make changes to
files?

is there a one off command that i can use after creating the rails
project that will set this up safely for me?

Are you running it from your home folder (or subfolder) or somewhere
else?

If you are running it from there which files is it complaining about
when
creating a project?

Colin

2009/5/14 Adam A. [email protected]

i dont know why but when i tried rails testproject without sudo it
worked fineā€¦ need to stop smoking crack guess.

Well now ive worked quite a bit on this sudo project so is there any way
to unsudo it quickly?

im guessing one way would be to send it to git and then grab it again
(ive never used git but someone once mentioned this in antoher thread i
think).

but that means i nee to spend more time learning something new so if
theres another way im all ears.

many thanks for your reply!

Adam A. wrote:

Well now ive worked quite a bit on this sudo project so is there any way
to unsudo it quickly?

cd projectdir
sudo chown -R adam .

thanks andrew for that.