Go Back   The macosxhints Forums > OS X Help Requests > Applications



Reply
 
Thread Tools Rate Thread Display Modes
Old 02-02-2002, 02:32 AM   #1
soob
Prospect
 
Join Date: Jan 2002
Location: Milwaukie, OR
Posts: 46
Unhappy iTunes and file permissions

I have a large mp3 collection made from my CD's in a shared music folder which is accessible to all users on the computer.

I made the permissions of all the folders 1775 and all the files 664. Since all users are part of the group these files belong to, everybody can read/write to them but only I can (re)move them.

I like iTunes ability to start and stop the play of files at positions in the file other than the beginning and end but I can't seem to edit this setting while logged in as a user other than myself... none of the tags are editable. And this setting appears to be stored on a user by user basis, so i can't set it for me and have everybody pick it up.

I use MP3 Rage for tag manipulation and file organization and anybody in the group can modify any of the tags in these files as I would expect.

Why doesn't iTunes respect the file owner and permission settings?

TIA, Jim
soob is offline   Reply With Quote
Old 02-02-2002, 03:38 AM   #2
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
first off, i want to point out something about your permissions.

mode 1775 turns on the sticky bit, which says, "no one can delete files unowned by them", b-b-b-but your directory setting are g+w, so users in the group can usurp your files (write them, ganking ownership) and then delete them.

this is a common exploit, to wit:

well, i can't find an example right now, but i will tomorrow, if someone reminds me ;]

soob, would you check on that sticky bit and g+w business? can a user write to your song.mp3 file, usurping ownership, then delete it, via sticky bit perms?

i go to bed now. will look in on this in the am. oh, wait. it is the am. another day shot to hell *sigh*
mervTormel is offline   Reply With Quote
Old 02-02-2002, 01:09 PM   #3
soob
Prospect
 
Join Date: Jan 2002
Location: Milwaukie, OR
Posts: 46
yup, the sticky bit does just what i want it to... only i can rename, move, or remove the file and anybody in the group can write to the file. they can write to the file, but they can't chown or write over the file. this last is important because I'm not the primary login for this machine (i use my powerbook) but i want to be able to modify the tags without logging out and back in as me.

my primary purpose for using the sticky bit is to prevent accidental deletion of the files (I use that same scheme for the digital picture folders).

so, everything looks ok but iTunes won't let anybody but me change the start/stop points. hmm, thinking about it some more, if these aren't ID3 tags (are they?) then they must be stored somewhere else... there isn't any metadata for these files. if they're stored elsewhere, then they shouold be writable since i'd assume that it would be saved somewhere in ~/Library/

thanks, jim
soob is offline   Reply With Quote
Old 02-02-2002, 02:33 PM   #4
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
aha! very illuminating! very good thinking there, soob.

so, what are the permissions on the iTunes Music Library (2) ?

mine are thus:

% ll
-rwxr--r-- 1 user wheel 4.4M Feb 2 09:40 iTunes Music Library (2)*

note that i've purposely set them this way, YMMV

but, start/stop times are prolly stored in the lib, so see if your perms can be fiddled to allow write access.

but, importantly, what happens when more than one user writes to the library ?!

disaster ? or benign ? i recall reading that it's benign, which is awful ambitious for a jukebox, but before you fiddle-futz with a hundred start/stop times (which i don't understand), i'd test test test that you don't corrupt or otherwise need to ever rebuild your lib. rebuilding your lib likely might lose these settings.

let us know.
mervTormel is offline   Reply With Quote
Old 02-02-2002, 08:48 PM   #5
soob
Prospect
 
Join Date: Jan 2002
Location: Milwaukie, OR
Posts: 46
the permissions are (and what's with the (2) in this filename, it's not like there are 2 of them):

-rw-r--r-- 1 user staff 1548118 Feb 2 17:35

so, the user has write access to their own library (located in ~/Documents/iTunes/), they should be able to set the start/stop points themselves.

as far as more than one user writing to the library, since each user has their own library, i haven't tried this

in case you were wondering why i want to set start/stop times, i've got a few child story cd's which have some intro stuff on the first tracks... i want the playback to start where the story begins.

hope you (or someone) can help, jim
soob is offline   Reply With Quote
Old 02-02-2002, 10:37 PM   #6
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
o i c

i thought you were sharing the iTunes Music Library (2)

the (2) designates version 2 of iTunes, not version 2 of the lib file, i'm pretty sure. in other words, iTunes v2.x did not want to stomp on anyone's v1.x lib file.

as for your particular dilemma, let's agree that the start/stop feature is not an mp3 tag feature, but an iTunes **** data feature that is stored in the entry for the file in the iTunes Music Library (2)

is that the way you see it?

if yes, then the user had oughta be able to modify their lib ****-data for an mp3, agreed? they own the lib, are writable to it.

so, something else is afoot. what happens if said user adds something from their personal Tony Bennet collection? can they set start/stop time for that? if so, then there is something with your shared collection that prevents this, perhaps.

have i replicated your setup correctly?

Code:
% id
uid=501(merv) gid=20(staff) groups=20(staff), 0(wheel), 80(admin)

% id zeke
uid=502(zeke) gid=20(staff) groups=20(staff)

% mkdir foo
% ll -d foo
drwxr-x---    2 merv     staff          24 Feb  2 19:15 foo/

% chmod 1775 foo
% ll -d foo
drwxrwxr-t    2 merv     staff          24 Feb  2 19:15 foo/

% sudo chown zeke foo
Password:
% ll -d foo
drwxrwxr-t    2 zeke     staff          24 Feb  2 19:15 foo/

% cd foo/

-----
Finder copy an mp3 into foo
-----

% ll
total 4.8M
-rwxr--r--    1 merv     staff        4.8M Jan  1 15:17 Big Brown Eyes*

% 
% chmod 664 Big\ Brown\ Eyes
% ll
total 4.8M
-rw-rw-r--    1 merv     staff        4.8M Jan  1 15:17 Big Brown Eyes
With the above, I am able to add that mp3 to an itunes playlist, and set its start/stop times.

i wonder if its some other perms in the path to the mp3 other than sticky dir as i am still god in the path to this foo dir

let us know.
mervTormel is offline   Reply With Quote
Old 02-03-2002, 12:12 AM   #7
soob
Prospect
 
Join Date: Jan 2002
Location: Milwaukie, OR
Posts: 46
agreed, not an mp3 tag

and yes, you do have my setup (mostly) right... though all of the files/directories in the music tree are owned by me. i use a script to go through periodically and change any new directories/files to the proper owner and permissions to prevent the accidental removal... i use the current login to rip the cd's; seems a waste to logout, login as me, rip the cd, logout and login as the other user.

and yes, any mp3 that is owned by the other user, has start/stop points that are settable by the other user (before the ownership change)

wait, let me clarify that last statement... i decided (finally) to do some investigation. as long as the directory is owned by the user, any mp3 in that directory can have the start/stop settings changed. and that's regardless of if the file is owned or writable by the current user. and get this, if the directory is not owned by the current user, all tags are uneditable (ID3 tags included) but when the directory is owned by the current user, all tags are editable, even if the file is not writable by the current user. in that case, it appears that your changes take until the song is played or you look at the tags again, then they revert back to what's in the file (no error is displayed when the OK button is clicked). The start/stop settings are not reverted in this (makes sense if the storage place for this setting is in the library and not the file).

so, it looks as if itunes has some file/directory permissions issues that aren't solvable by us.

thanks for your help, you finally prodded me to get off my butt and do some more thorough investigation.

jim
soob is offline   Reply With Quote
Old 02-03-2002, 12:31 AM   #8
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
Quote:
thanks for your help, you finally prodded me to get off my butt and do some more thorough investigation.

great. i'll let you eye it. smells like it may be an X'or bug in itunes' permissions masking. consider reporting your findings so that we may all benefit from them.
mervTormel is offline   Reply With Quote
Old 08-21-2004, 06:47 PM   #9
f1
Prospect
 
Join Date: Aug 2004
Location: interzone
Posts: 1
HI, I've been wondering about this all day, i'm looking for information how itunes handles that data it is in command of. I know that it adds an id3v2 tag to any mp3 it stumbles about (e.g. has permissions to modify) and i do not like that. I would rather prefer forcing it into not to touch my files but i think general denial of permissions for any file access of my account would cripple me too much while (ab)using fast user switching for this would be bloat. Any ideas?
I do have disabled reading and writing to all my files in my music collection to anyone but root at the moment.
Ehrm. I hope i was able to express my point, i'm not a native speaker so please if you did not understand what i meant *please* ask, i will try to clearify. Informations i am interested in cover for example what data can be stored in itunes' internal database and what not and if it is possible to change that data without modifying those files. I also wonder if it would be possible to modify iTunes that way that it only uses its internal db instead of going for the tags first.

Why does it add id3v2 tags anyway? I changed song ratings and played it a number of times and that file's hash did not change. I know about (dis)advantages of id3v2 vs id3v1 but that initial conversion does make no sense to me.

If you feel too shy to expose yourself to public criticism a pm would be very much welcome, i do welcome any kind of help and links i can get this is getting tiresome.

Edit: »WTFOMG«, i've brought a thread from 2002 back up. Please don't get mad at me or... whatever. No ghosts/demons/zombies involved.

Last edited by f1; 08-21-2004 at 06:57 PM.
f1 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:58 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.
You Rated this Thread: