LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Why are mp3s and oggs executable? (https://www.linuxquestions.org/questions/linux-general-1/why-are-mp3s-and-oggs-executable-290500/)

busbarn 02-15-2005 09:28 AM

Why are mp3s and oggs executable?
 
This last weekend I was trying to edit some tag info on ogg files that were given to me by my brother. I soon realized that oggs and mp3s ripped in windows are read only, and they are executable. So if I want to edit the tags, I have to change the permissions to user writable. This poses two questions in my mind:

1. Should audio files be executable or this a securtiy risk? I know that as long as these executables don't have root access, it's okay, but it still seems odd to me to have an audio file need to be executable. Any ideas?

2. Do mp3 players require the mp3s and oggs to be executable? I have a neuros and iaudio u2. The neuros plays anything whether it's executable or not, but the u2 won't play an ogg or mp3 unless it's executable.

If anyone could shed some light on this, that would be great.

crabboy 02-15-2005 09:42 AM

1. No they should not be executable. It would only be a security risk if the .mp3 file was actually a binary program or script and not just binary data as an mp3, ogg file should be.

2. No, just readable by the user that is trying to access.

busbarn 02-15-2005 10:13 AM

Hmmm. Interesting. Thanks for the reply crabboy. Is there a reason why windows apps would enable executable permissions? I've aslo found that sometimes k3b (my default ripper to ogg) creates executable permissions. I guess in the big scheme of things, it's no big deal, but it does seem to be a mystery to me!

perfect_circle 02-15-2005 10:45 AM

This could have something to do with the umask entry of the partition in fstab if all your files are executable. I'm using umask=000 for my windows partitions so every file is actually rwx.
Also if you have a umask=0222 then you'll have r+x permission but not write.

busbarn 02-15-2005 01:40 PM

I'm not using umask or windows, but I have a few friends who use only windows (I know I know I'm working on it). Anyways, I don't think you can change the permissions on a windows file can you? It just seems silly to me. Anyways, thanks for you replies.

IsaacKuo 02-15-2005 01:53 PM

The reason the permissions looks funny probably has to do with how you "transfered" the files to Linux. Windows and windows file systems don't have the same sort of permissions bits as Linux and Unix do. Consequently, Windows SMB networking doesn't communicate the sort of file permissions bits that Linux does--so whatever SMB client you're using has to fill in the blanks with defaults.

One way to fill in those blanks is to default to making every file executable, since there's no way to really tell whether or not they're supposed to be executable.

Windows apps don't set or unset the "executable" permissions bit, because no such "executable bit" even exists in Windows. Whatever Windows program you used to encode the file has no control or influence over whether or not the "executable" permissions bit gets set later on when Linux sees the file.

busbarn 02-15-2005 07:10 PM

Good info--I never thought of that. Thanks Isaac.

frieza 02-15-2005 09:04 PM

yes... on a side note, the same thing happens with legacy mac formatted volumes, it's an FS issue


All times are GMT -5. The time now is 04:05 AM.