Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have messed up my home directory. I'm using dash as my shell and by myself I can create files just fine, but others can't. I don't think that made sense as it's kind of hard to explain, so hopefully this can enlighten you:

alex@ubuntu:~$ ls -l 
total 4
drwxrwxrwx 2 alex www-data 4096 Sep 21 17:55 public_html
alex@ubuntu:~$ git clone git://github.com/twitter/bootstrap
fatal: Could not switch to 'bootstrap': Permission denied
alex@ubuntu:~$ chmod 777 .
alex@ubuntu:~$ git clone git://github.com/twitter/bootstrap
fatal: destination path 'bootstrap' already exists and is not an empty directory.
alex@ubuntu:~$ rm -rf bootstrap
alex@ubuntu:~$ git clone git://github.com/twitter/bootstrap
fatal: Could not switch to 'bootstrap': Permission denied
alex@ubuntu:~$ chmod -R 777 *
alex@ubuntu:~$ git clone git://github.com/twitter/bootstrap
Cloning into 'bootstrap'...
/home/alex/bootstrap/.git/refs: Permission denied
alex@ubuntu:~$ ls -l ..
total 4
drwxrwxrwx 3 alex alex 4096 Sep 21 18:07 alex
alex@ubuntu:~$ 

Not sure what I've done wrong or if it relates to my umask, but any advice is welcome. Thanks!

share|improve this question
    
It think, this problem more related with git rather that with home directory and permission settings. git has specific permission settings as far as I know –  Anwar Shah Sep 21 '12 at 17:20
    
It's not only git. If I add files to my public_html and try view them in my browser, I get a 403 unless I chmod it to 777. –  Alex Sep 21 '12 at 17:23
    
try putting the file directly into home directory and view it in browser. what happen? –  Anwar Shah Sep 21 '12 at 17:24
    
That won't work; the document root in my Apache config is the public_html folder. It's set to 777 anyway, as is my home directory. –  Alex Sep 21 '12 at 17:26
add comment

1 Answer 1

You must use sudo before the commands

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.