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.

Not sure what caused it but one day I couldn't download any files into my download directory where the error was "Insufficient permissions". I tried other locations /Documents /Desktop but I didn't have permission for those either. I can only download into /home. I thought this might be google chrome specific but I tried in firefox and also with transmission but every time it fails. I'm running 64 bit, 14.04 on AMD FX(tm)-8320 dual boot with windows 8. How can I get permission to download files anywhere but my home directory?

Thanks and sorry for the noob question

Output of ls -l

drwxr-xr-x   3 www-data www-data     4096 Jul 11 18:13 Desktop
drwxr-xr-x   4 www-data www-data     4096 Jul 14 18:43 Documents
drwxr-xr-x   5 www-data www-data     4096 Jul 10 13:29 Downloads
-rw-r--r--   1 www-data www-data     8980 Jun 26 19:39 examples.desktop

drwxr-xr-x 450 www-data www-data    20480 Jul  8 19:03 Music
drwxr-xr-x   2 www-data www-data     4096 Jun 26 19:53 Pictures
drwxr-xr-x   2 www-data www-data     4096 Jun 26 19:53 Public
drwxrwxr-x   5 www-data www-data     4096 Jul  1 00:58 sketchbook
drwxr-xr-x   2 www-data www-data     4096 Jun 26 19:53 Templates
drwxr-xr-x   2 www-data www-data     4096 Jun 26 19:53 Videos

And output of ls -l /

total 100
drwxr-xr-x   2 root root  4096 Jul 24 09:56 bin
drwxr-xr-x   4 root root  4096 Jul 23 14:17 boot
drwxr-xr-x   4 root root  4096 Jun 26 20:50 boot-sav
drwxrwxr-x   2 root root  4096 Jun 26 19:39 cdrom
drwxr-xr-x  17 root root  4360 Aug  1 09:04 dev
drwxr-xr-x 145 root root 12288 Aug  1 12:58 etc
drwxr-xr-x   3 root root  4096 Jun 26 19:39 home
lrwxrwxrwx   1 root root    33 Jul 17 20:23 initrd.img -> boot/initrd.img-3.13.0-32-generic
lrwxrwxrwx   1 root root    33 Jun 26 19:41 initrd.img.old -> boot/initrd.img-3.13.0-24-generic
drwxr-xr-x  23 root root  4096 Jun 26 19:42 lib
drwxr-xr-x   2 root root  4096 Apr 16 21:21 lib64
drwx------   2 root root 16384 Jun 26 19:29 lost+found
drwxr-xr-x   3 root root  4096 Jun 26 19:53 media
drwxr-xr-x   3 root root  4096 Jun 26 20:50 mnt
drwxr-xr-x   4 root root  4096 Jul  1 00:52 opt
dr-xr-xr-x 257 root root     0 Aug  1 05:04 proc
drwx------   8 root root  4096 Jul 14 18:02 root
drwxr-xr-x  25 root root   820 Aug  1 12:39 run
drwxr-xr-x   2 root root 12288 Jul 24 09:56 sbin
drwxr-xr-x   2 root root  4096 Apr 16 21:21 srv
dr-xr-xr-x  13 root root     0 Aug  1 05:04 sys
drwxrwxrwt   8 root root  4096 Aug  1 17:17 tmp
drwxr-xr-x  10 root root  4096 Apr 16 21:21 usr
drwxr-xr-x  14 root root  4096 Jul 11 18:17 var
lrwxrwxrwx   1 root root    30 Jul 17 20:23 vmlinuz -> boot/vmlinuz-3.13.0-32-generic
lrwxrwxrwx   1 root root    30 Jun 26 19:41 vmlinuz.old -> boot/vmlinuz-3.13.0-24-generic
share|improve this question
1  
Can you edit the answer to include the output of the command ls -l –  Tim Aug 1 at 21:21
    
@Tim just did. Thanks –  tausch86 Aug 1 at 21:23
    
woop sorry you edited that. I messed up the formatting –  tausch86 Aug 1 at 21:25
1  
Also, could you add the output of ls -l /? And have you run any chown commands lately? –  Wilf Aug 1 at 21:25
    
Don't worry! (Ctrl+K when you've selected it to format code). –  Tim Aug 1 at 21:26

2 Answers 2

up vote 2 down vote accepted

You have the wrong owner set on your /home/$USER

sudo chown -R $USER:$USER /home/$USER to change the user and group as well.

share|improve this answer
    
Is sudo needed? –  Tim Aug 1 at 21:30
1  
Yes because its a chown –  Shutupsquare Aug 1 at 21:31
2  
@Tim - yes, to change which user owns the home directory. N.B. sudo chowb -R $USER:$USER /home/$USER should change the group as well. –  Wilf Aug 1 at 21:31
1  
Cheers for the group @Wilf slipped my mind! –  Shutupsquare Aug 1 at 21:35
    
@Shutupsquare - your welcome - beware of any typos, I should of put chown etc... –  Wilf Aug 1 at 21:37

The problem is you changed your folders to be owned by the user www-data.

To change them back to your own user do chown -R your-username ~/*. Also do chgrp -R your-username ~/* to change them to your group. You might have to use sudo for that.

share|improve this answer

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.