PDA

View Full Version : Huge iTunes Permissions Problem



Jaffa
1st March 2008, 11:41 PM
Hey fellow Mactalkians!

I am having a huge permissions problem with my iTunes library and need some help. To illustrate my point I have taken the following screen shot and have tried to rename my iTunes Music folder.

http://img.skitch.com/20080301-fpqub51x78agsfy64rwhkx1qnq.jpg

1. I tried to rename the iTunes Music Folder to Old iTunes Music.
2. It spat the dummy at me and said I'm not allowed to do that... WTF? It's my folder.
3. As you can see from the permissions window I have Read & Write Access.
4. It says I don't have Read & Write Access. It looks like it's just as confused as I am.

You see, the problem started when I tried to add a song to the library, a song where another part of the album was present, and it gave me a You do not have permission to do that error. I went looking and it appears that I have Read & Write in the list, but the Finder thinks I have custom access.

I even tried the old sudo chown -R Jeffrey:Jeffrey ~/Music/iTunes trick, but it did not work. I did notice that all the folders have the permissions shown above, but all the song files have the permissions shown in the below screen shot:

http://img.skitch.com/20080301-x33qi6qi5qtmr864m175pgdg3y.jpg

I hope I have made the problem description clear and someone will be able to help me with this situation.

Thanks in advance

Jeff

Comet
2nd March 2008, 12:18 AM
Does running the disk utility to repair permissions help?

sirstaunch
2nd March 2008, 01:29 AM
Probably won't change as it's a directory for iTunes to find the tracks, it's all stored in the database ie iTunes Music and/or iTunes Library.xml

halledise
2nd March 2008, 04:36 AM
Hey fellow Mactalkians!

I am having a huge permissions problem with my iTunes library and need some help. To illustrate my point I have taken the following screen shot and have tried to rename my iTunes Music folder.

http://img.skitch.com/20080301-fpqub51x78agsfy64rwhkx1qnq.jpg

1. I tried to rename the iTunes Music Folder to Old iTunes Music.
2. It spat the dummy at me and said I'm not allowed to do that... WTF? It's my folder.
3. As you can see from the permissions window I have Read & Write Access.
4. It says I don't have Read & Write Access. It looks like it's just as confused as I am.

You see, the problem started when I tried to add a song to the library, a song where another part of the album was present, and it gave me a You do not have permission to do that error. I went looking and it appears that I have Read & Write in the list, but the Finder thinks I have custom access.

I even tried the old sudo chown -R Jeffrey:Jeffrey ~/Music/iTunes trick, but it did not work. I did notice that all the folders have the permissions shown above, but all the song files have the permissions shown in the below screen shot:

http://img.skitch.com/20080301-x33qi6qi5qtmr864m175pgdg3y.jpg

I hope I have made the problem description clear and someone will be able to help me with this situation.

Thanks in advance

Jeff

simplistic query - but why on earth do you want to rename it anyway?

to remedy your problem of 'adding a song to the library, a song where another part of the album was present' -
close iTunes -
find the album in your iTunes library and drag it to the desktop -
add the song(s) from cd by not opening iTunes (or closing it when it auto-opens) by dragging said song to album folder on your desktop -
now open iTunes and go file/add to library (command + O) -
all songs should now be there in your library and so you can delete the folder off your desktop

Jaffa
2nd March 2008, 09:01 AM
For those who were asking if i repaired permissions, I did, but I know it doesnt do anything to the iTunes Library. Reipairing permissions only changes the permissions on system files and folders and installed applications as indicated in the Package Reciepts folder.


simplistic query - but why on earth do you want to rename it anyway?

to remedy your problem of 'adding a song to the library, a song where another part of the album was present' -
close iTunes -
find the album in your iTunes library and drag it to the desktop -
add the song(s) from cd by not opening iTunes (or closing it when it auto-opens) by dragging said song to album folder on your desktop -
now open iTunes and go file/add to library (command + O) -
all songs should now be there in your library and so you can delete the folder off your desktop

I don't want to rename my iTunes folder, but I was doing it to illustrate my point.

You see, lets say I find that I have incorrectly spelt the name of an album, i fix the album, but iTunes cannot modify the folder in my itunes library so that it shows the correct album.

Lets say I delete a song in my iTunes library, and then I select "Move to Trash", it cannot move the folder to the trash because of the permissions reason.

And that 'solution' does not help unfortunately. It is a permissions problem, and that what I need to somehow fix, the permissions.

You see, if I go to any folder I on my desktop or whatnot it says I have Read & write access as you can see below.

http://img.skitch.com/20080301-jkgtibpx9i4anynm7pytpybth7.jpg

But for some reason, even tho read and write access is enabled and i am the owner of the itunes files it still says i have custom permissions. So the only fix for this situation is somehow getting the status of all the files in my itunes library folder to dsplay as read and write access. Once that is granted all will go smoothly. Unfortunately that is what I need help with.

lurka
2nd March 2008, 10:07 AM
Jaffa,
Tell me somethin'
when you open address book , can you see the little plus button to add a new contact?

Jaffa
2nd March 2008, 10:31 AM
Jaffa,
Tell me somethin'
when you open address book , can you see the little plus button to add a new contact?

Yep I can, and it works when I press it.

mctext
2nd March 2008, 11:11 AM
halledise is probably right if that's all you want to do.
If you really want to muck around, enable root, log on as root.
Do what you need and then (I strongly advise) disable root again.

mct

Currawong
2nd March 2008, 11:38 AM
There's a possibility that extended attribute permissions have somehow been enabled on the folder to lock it. I don't know easily how to manipulate those in Leopard yet. Extended attributes override UNIX permissions.

Edit: Found this: xattr version 0.1 for Mac OS X 10.5 Leopard (http://xattr.darwinports.com/) and this discussion (http://discussions.apple.com/thread.jspa?messageID=5985184) about file permissions and extended attributes.

Edit2: Doing an ls -le in my home folder showed up:

drwxr-xr-x+ 4 currawong currawong 136B 11 Feb 00:10 Music/
0: group:everyone deny delete

Didn't know that was set!

Jaffa
2nd March 2008, 12:22 PM
Edit2: Doing an ls -le in my home folder showed up:

drwxr-xr-x+ 4 currawong currawong 136B 11 Feb 00:10 Music/
0: group:everyone deny delete

Didn't know that was set!

I have that too on pretty much all the folders in my Home folder, all folders except the ones that were made after I had got leopard. It appears that this problem is one that has something do do with an Upgrade Install from Tiger 10.4.10 to Leopard 10.5.

Still battling as to how to fix it. Some research says that the 0: group:everyone deny delete means that it doesnt matter who you are, even if you are the owner of the file or folder, it wont let you touch it. Something to do with ACL extensions clinging on to the files.

it appears that this is quite a large problem and not only present in the iTunes library but all the folders that were present in my Home folder from the upgrade to Leopard. And please someone do not say "Reinstall" as that is not a valid fix for this issue. There has to be some way to fix this permissions problem.

Jaffa
2nd March 2008, 12:30 PM
Okay. I have figured out that if I run chmod -a# 0 /path/to/directory on every folder and file in my Home folder it will get rid of the ACL "0 everyone no delete" thing that comes up. Now, is it possible to run a script to run this command on every file and folder inside my home folder?

Cheers.

Currawong
2nd March 2008, 12:30 PM
chmod +a can fix them.

zbaron
2nd March 2008, 12:47 PM
I suggest checking the permissions on the iTunes folder, as renaming a file or folder modifies the enclosing folder, not the one you are renaming.


laptop:~ user$ cd Music/iTunes
laptop:iTunes user$ ls -la
total 8776
drwxr-xr-x 8 user group 544 2 Mar 12:35 .

If your '.' does not look like that, run


chmod 755 .

Silly question. You don't have iTunes open at the same time you are doing this do you?

Jaffa
2nd March 2008, 02:02 PM
I suggest checking the permissions on the iTunes folder, as renaming a file or folder modifies the enclosing folder, not the one you are renaming.


laptop:~ user$ cd Music/iTunes
laptop:iTunes user$ ls -la
total 8776
drwxr-xr-x 8 user group 544 2 Mar 12:35 .

If your '.' does not look like that, run


chmod 755 .

Silly question. You don't have iTunes open at the same time you are doing this do you?

No, ofcourse iTunes wasnt open when I was fixing the files.

The thing is, that command above for 755 wont fix things.

I have (and thanks to currawong and dave for helping) a way to fix this issue. It is caused by the ACL extensions on files and folders with the property set to 0: group:everyone deny delete.

This seems only to affect people that have done an 'Upgrade' from 10.4 to 10.5. It is a one command process, but it takes a long time for the command to execute as it finds all the files and folders in your home folder and gets rid of this ACL. Mac OS X can then rebuild the ACL with the correct properties on the file.

I am currently running the command, and if the command proves to work I will post it here. Don't want to have others running this command and wrecking their user folder :P

:)

zbaron
2nd March 2008, 02:39 PM
Thats cool. I was just throwing out some random thoughts, because I upgraded from 10.4 to 10.5 and have the extended ACLs present, but am able to rename that folder without any problems.

Jaffa
2nd March 2008, 02:57 PM
Thats cool. I was just throwing out some random thoughts, because I upgraded from 10.4 to 10.5 and have the extended ACLs present, but am able to rename that folder without any problems.

Okay, thats weird. It must mean it only affects some users. Dunno why it is occurring, but I am not the first case out there, I can tell you that :p

Anyhow, MY SOLUTION:

find ~ -exec sudo chmod -R -a# 0 {} \;

If you run the above in terminal, it will ask you for your password. If you type in your password, it will do the following:

Retrieve the path for every file and folder in your users Home folder, no matter of its permissions, its visibility, or your access to it.
Run the command chmod -R -a# 0 on every file and folder retrieved from the above point. (I know the -R is not necessary, but I put it in there for double-check sake. It shouldnt make too much of a difference in run time, maybe an extra minute or so.) This comma d removes the 0: group:everyone deny delete. ACL extension on each of the files.

This solution is probably not the best one around, but it means that Mac OS X can then add each of the files ACL extensions when used, and therefore will be fully compatible. I think the problem is 10.4 ACL's and 10.5 ACL's dont like being mixed, but not 100% sure.

Once the command is started it should no be stopped as you will have differences in ACL's all through your user folder.

As always BACKUP BEFORE USE. I am not responsible if you wreck something!

Once again, thanks to those who helped, and especially Currawong and Dave!

Jeff

halledise
2nd March 2008, 03:34 PM
I have that too on pretty much all the folders in my Home folder, all folders except the ones that were made after I had got leopard. It appears that this problem is one that has something do do with an Upgrade Install from Tiger 10.4.10 to Leopard 10.5.


what Mac are you running?

if it's an iMac, particularly a Core Duo one, then that seems to be the machine that doesn't especially like being upgraded from Tiger to Leopard - & don't ask me why.

I've had 2 clients plead with me to come and reinstall them to Tiger because of anomalies running Leopard - email (Mail.app) playing up and the like.

for another iMac client (friend) we backed up - wiped out Tiger altogether and clean installed Leopard - everything's worked like a charm since then.
(PowerBook G4's and early MacBooks don't have this problem)

not a suggestion for you - just some useless info that's all.

Currawong
2nd March 2008, 04:39 PM
halledise: This is purely a software issue, nothing to do with the machine. Your clients probably had some or other old non-leopard compatible software installed that made things behave badly after the upgrade.

halledise
2nd March 2008, 05:16 PM
halledise: This is purely a software issue, nothing to do with the machine. Your clients probably had some or other old non-leopard compatible software installed that made things behave badly after the upgrade.

point taken Curra - yet what I'm describing is purely a software issue and the conflicts folk had with upgrading Tiger software to Leopard software and in 2 cases ran only Apple software + MS Office for Mac + fully compatible 3rd party software such as Adobe CS2, Toast Titanium, Easy Crop, and similar.

perhaps my comments are not entirely useful - yet they are examples of upgrading issues on CoreDuo Intel iMacs that I have not experienced on either PPC or Intel machines of specs that Apple say will happily run Leopard.

(withdraws) :cmd:

Jaffa
2nd March 2008, 08:44 PM
It's a MacBook CD, but I am convinced thats nothing to do with it :p

Dunno why it happened nor what caused it, but the command above fixed it for me, so I'm happy :D

zbaron
2nd March 2008, 09:38 PM
Another quick thought, is that your local account must have been added to the 'everyone' group. My local account has not. Now i'm intrigued as to why ...


milamber:~ bruce$ id
uid=501(bruce) gid=501(bruce) groups=501(bruce),98(_lpadmin)
milamber:~ bruce$ groups
bruce _lpadmin

Sorry, my "must get to the bottom of this" switch has been turned on. :)

Jaffa
2nd March 2008, 10:29 PM
I'm not in the everyone group tho, thats the first thing I checked:

MacBook:~ Jeffrey$ id
uid=501(Jeffrey) gid=20(staff) groups=20(staff),98(_lpadmin),81(_appserveradm),79 (_appserverusr),80(admin)
MacBook:~ Jeffrey$ groups
staff _lpadmin _appserveradm _appserverusr admin
MacBook:~ Jeffrey$

Currawong
2nd March 2008, 11:38 PM
umm... 'everyone' group? No such thing exists. It's called 'everyone' to mean 'irrespective of group'.

zbaron
3rd March 2008, 10:05 AM
I was looking because there is an everyone group defined in /etc/groups. I can't remember how to dig that out of NetInfo which has changed significantly on Leopard.


$ grep everyone /etc/group
everyone:*:12:

I'd expect, that if there was to be an ACL entry used as a catch-all, then it would appear as 'group:*'.

Jaffa
3rd March 2008, 08:01 PM
umm... 'everyone' group? No such thing exists. It's called 'everyone' to mean 'irrespective of group'.

Thats what I figured after posting :P



I was looking because there is an everyone group defined in /etc/groups. I can't remember how to dig that out of NetInfo which has changed significantly on Leopard.


$ grep everyone /etc/group
everyone:*:12:

I'd expect, that if there was to be an ACL entry used as a catch-all, then it would appear as 'group:*'.

I am guessing thats probably just a placeholder so that the computer doesnt get too confused :S

Currawong
3rd March 2008, 10:16 PM
You can use Workgroup Manager in Leopard. There does indeed appear to be an "everyone" group. I learn something new every day.