View Full Version : [ubuntu] [SOLVED] Read Only problem with music files

Dermot Doyle
November 11th, 2008, 10:44 PM
I have all my music on a separate hard drive and it's all in a mess so I want to rearrange it. One folder contains about 30 albums, but I can't cut and paste them out of it. The folder has the padlock 'read only' symbol on it for some reason. Is that what is stopping me from moving the folders inside it and how do I turn it off? Most of the music was put on the hard drive with XP, though I haven't had any trouble with hundreds of other albums so I guess that's not the problem.

November 11th, 2008, 11:10 PM
I'm not sure how the permissions got messed up, but it is easily fixed.

Let's say the folder in question is called “Music”, and it's on your desktop. This will fix it:

sudo chown $USER:$USER -vR ~/Desktop/Music
chmod +rw ~/Desktop/Music

Dermot Doyle
November 12th, 2008, 06:35 PM
Hi, thanks for the help, but maybe it wasn't quite idiot proof enough. My seperate hd is called 'LACIE'. Inside it one of the folders is called 'wma' and inside that is one called 'current playlist' which is the locked one. No matter how I type the path in the terminal It can't seem to find it as you can see:

dermot@dell-desktop:~$ sudo chown $USER:$USER -vR ~/computer/media/LACIE/wma/current playlist
chown: cannot access `/home/dermot/computer/media/LACIE/wma/current': No such file or directory
failed to change ownership of `/home/dermot/computer/media/LACIE/wma/current' to dermot:dermot
chown: cannot access `playlist': No such file or directory
failed to change ownership of `playlist' to dermot:dermot

Any ideas on exactly what I should be typing to find it?

November 12th, 2008, 06:38 PM
It's a problem with white space in the folder name. Try

sudo chown $USER:$USER -vR ~/computer/media/LACIE/wma/current\ playlist
Alternatively, type as far as current and then hit the tab key for autocompletion.

Dermot Doyle
November 12th, 2008, 08:07 PM
Unfortunately meither of them worked.

dermot@dell-desktop:~$ sudo chown $USER:$USER -vR ~/computer/media/LACIE/wma/current\ playlist
[sudo] password for dermot:
chown: cannot access `/home/dermot/computer/media/LACIE/wma/current playlist': No such file or directory
failed to change ownership of `/home/dermot/computer/media/LACIE/wma/current playlist' to dermot:dermot
dermot@dell-desktop:~$ sudo chown $USER:$USER -vR ~/computer/media/LACIE/wma/current
chown: cannot access `/home/dermot/computer/media/LACIE/wma/current': No such file or directory
failed to change ownership of `/home/dermot/computer/media/LACIE/wma/current' to dermot:dermot

Anything else I coud try? I put in the path 'computer' because I found the drive there in 'PLaces' and added 'media' because it was called that when I opened the drive to get the folders inside. I think I have tried every possible permutation, but maybe I am doing something very basic wrong.

November 12th, 2008, 08:11 PM
Sorry, I overlooked it the first time round. Leave out the leading "~/computer" bit. The command should look like

sudo chown $USER:$USER -vR /media/LACIE/wma/current\ playlist

If you want to be sure, always type the first few characters of the directory name and then hit tab for autocompletion. If it doesn't autocomplete, it means that you need to type in some more characters because there are several possibilities for completion. Eg type
sudo chown $USER:$USER -vR /med tab LAC tab wm tab current tab

Dermot Doyle
November 12th, 2008, 08:33 PM
That did it in that I think it found every track in every folder in the drive, but every one said 'Operation not permitted' and ended with 'failed to change ownership...'
By the way, I assume it found everything, but there are 91 albums in there and the terminal didn't list them all. I did notice that scrolling back up the terminal my command had disappeared so I am assuming it only shows the last of a bigger list of failures. Is that right? Whatever I have done before, I have always been able to scroll back to the begining to see how I got there.
One last thing in case it is important, Only the folder 'current playlist' is locked, the folders inside have no symbol. I am assuming it is because the 'current playlist' folder is locked that I can't move the ones inside.

November 12th, 2008, 08:42 PM
Did you also change the permissions, not only the ownership? To do that you can do

sudo chmod -cR u+rwX /media/LACIE/wma/current\ playlist

You can't see all the output because the terminal stores only a certain number of lines in its memory. You can change this number under Settings. The reason you have always been able to scroll back to your input is that you have never had such a large output. If next time, you don't want to see any output at all, you can leave out the v option in the command, ie in this case you would have done "... chown -R ..." instead of "... chown -vR ..."

Dermot Doyle
November 12th, 2008, 09:26 PM
Hi, another thing. I just tried your second code by cutting and pasting the file path from your last reply, but I got:

dermot@dell-desktop:~$ chmod +rw ~/media/LACIE/wma/current\ playlist
chmod: cannot access `/home/dermot/media/LACIE/wma/current playlist': No such file or directory

Seems funny that it found the folders the first time, but not now.

November 12th, 2008, 09:37 PM
As I told you before, the directory is called
/media/LACIE/wma/current\ playlist and not ~/media/LACIE/wma/current\ playlist

Dermot Doyle
November 12th, 2008, 10:02 PM
Thanks for your patience and help. It worked and I can move the folders. One small thing, when I ran your second command I got this:

dermot@dell-desktop:~$ chmod +rw/media/LACIE/wma/current\ playlist
chmod: missing operand after `+rw/media/LACIE/wma/current playlist'

Since everything seems to work is this a problem? Otherwise I'll mark the thread solved.
Thanks again.

November 12th, 2008, 10:08 PM
You need to place a space between the +rw and the file path. ;)

Dermot Doyle
November 13th, 2008, 07:53 PM
Thanks again.