1

I am having a problem with accessing my files.
I have a music partition, to which I added several album folders. Madsonic did not have permission to view the music. I chmod 666 the whole partition. Now all of my music folders appear as files. When I click on one I get 'The folder contents could not be displayed:you do not have the permissions necessary' (again, the folders all appear as files). I cannot cd to ~/Music, unless I am SU. ls -al on ~/Music gives

$ cd /home/loz/Music
Music $ ls -al
total 472
drw-rw-rw- 46 loz loz   4096 Nov  3 10:34 .
drwxr-xr-x 40 loz loz   4096 Nov  3 09:34 ..
drw-rw-rw-  2 loz loz   4096 Nov  1 18:42 About a boy
drw-rw-rw-  4 loz loz   4096 Nov  1 18:24 Akurat
drw-rw-rw-  2 loz loz   4096 Nov  1 18:25 Alanis Morissette
drw-rw-rw-  2 loz loz   4096 Nov  1 18:25 Amy Winehouse
drw-rw-rw-  4 loz loz   4096 Sep 14 23:09 Arctic Monkeys
drw-rw-rw-  2 loz loz   4096 Nov  1 18:25 Bjork
drw-rw-rw-  2 loz loz   4096 Nov  1 18:25 Canibal The Musical
drw-rw-rw-  3 loz loz   4096 Oct  4 13:52 Cast
drw-rw-rw-  6 loz loz   4096 Nov  1 18:12 coldplay
drw-rw-rw-  2 loz loz   4096 Nov  1 18:26 Damien Rice
drw-rw-rw-  4 loz loz   4096 Nov  1 18:17 Eva Cassidy - Somewhere (MP3) 2Lions
drw-rw-rw-  3 loz loz   4096 Nov  1 18:18 Eva Cassidy - Time After Time (Flac) (KingNova)
drw-rw-rw-  2 loz loz   4096 Nov  1 18:26 inne
drw-rw-rw-  2 loz loz   4096 Nov  1 18:26 Jamiroquai
-rw-rw-rw-  1 loz loz 280787 Apr 11  2013 Justin ringtone.mp3
drw-rw-rw-  2 loz loz   4096 Nov  1 19:16 Kama i Julia 2010.08
drw-rw-rw-  3 loz loz   4096 Nov  1 18:27 Katie Melua
drw-rw-rw-  2 loz loz   4096 Nov  1 18:27 Lenny Kravitz
drw-rw-rw-  2 loz loz   4096 Nov  1 18:28 Leon Jackson
drw-rw-rw-  6 loz loz   4096 Nov  1 18:29 LifeHouse Discography
drw-rw-rw-  2 loz loz   4096 Nov  1 18:30 Lily Allen
drw-rw-rw-  2 loz loz  16384 Sep  5 10:03 lost+found
drw-rw-rw-  2 loz loz   4096 Nov  1 18:15 Love Actually [2003][Eng]DVDRip-woodster
drw-rw-rw-  2 loz loz   4096 Nov  1 18:31 Michael Buble
drw-rw-rw-  3 loz loz   4096 Nov  1 18:31 Mika
drw-rw-rw-  2 loz loz   4096 Nov  1 18:32 Mor ve otesi
drw-rw-rw-  2 loz loz   4096 Nov  1 18:32 Myslovitz
drw-rw-rw-  2 loz loz   4096 Nov  1 18:32 Nelly Furtado
drw-rw-rw-  4 loz loz   4096 Sep 15 03:28 Nirvana
drw-rw-rw-  2 loz loz   4096 Nov  1 18:33 Nora Jones
drw-rw-rw-  2 loz loz   4096 Nov  1 18:33 Ona
drw-rw-rw- 12 loz loz   4096 Nov  1 18:38 Pearl Jam - Discography
drw-rw-rw-  2 loz loz   4096 Nov  1 18:39 Peter Gabriel
drw-rw-rw-  6 loz loz   4096 Nov  1 18:16 Pink
drw-rw-rw-  2 loz loz   4096 Nov  1 18:17 Pink - Funhouse - 2008
drw-rw-rw-  8 loz loz   4096 Nov  1 18:35 P!nk
drw-rw-rw-  2 loz loz   4096 Nov  1 18:39 Power of trinity
drw-rw-rw-  2 loz loz   4096 Nov  1 18:39 REM
drw-rw-rw-  2 loz loz   4096 Nov  1 18:40 Sam Sparro
drw-rw-rw-  2 loz loz   4096 Nov  1 18:40 The Cranberries
drw-rw-rw-  2 loz loz   4096 Nov  1 18:41 The doors - Waiting For The Sun
drw-rw-rw-  4 loz loz   4096 Nov  1 18:41 The Red Hot Chili Peppers
drw-rw-rw-  3 loz loz   4096 Sep 14 23:12 The Stone Roses
drw-rw-rw-  5 loz loz   4096 Nov  3 11:16 .Trash-1000
drw-rw-rw-  2 loz loz   4096 Nov  1 18:42 Walk Hard_ The Dewey Cox Story

so I do have the necessary permissions, and the files are recognised as Dirs. Is there any way to solve this problem?

1
  • The fact that you have the right permissions for the files inside ~/Music does not mean you can access them. You have to check the whole tree: ls -ld / /home /home/loz /home/loz/Music – Andrea Corbellini Nov 3 '14 at 17:13
4

Your folders need to have x bit set. So set your permissions as 775 (or 755) as you see fit to all folders. You can do a chmod -R 755 ~/Music, that will change permissions recursively on all files inside too. An explanation of how permission bits are treated differently for directories can be found here; in our case:

  • The execute bit allows the affected user to enter the directory, and access files and directories inside.
3
  • 2
    It would be better to use find: find ~/Music -type d -exec chmod 755 {} +. – muru Nov 3 '14 at 15:13
  • muru, why would it it be better to use find? – Laurence Cooper Nov 3 '14 at 21:23
  • @LaurenceCooper because the problem is only with directories, with my solution all normal files' permissions will also change. Makes sense. – SiddharthaRT Nov 4 '14 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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