You can't use chmod or chown on a fat32 filesystem. The filesystem doesn't save Linux permissions. Since you have it mounted on /media/, is it automounted? An option in properties for the drive icon (in kde at least) will allow you to change how a device is mounted.
If not, use the "uid", "gid", "dmask" and "fmask" mount options to change the permissions en mass when the device is mounted. See the man mount page.
For a Linux filesystem, if you are using Samba, then also check the smb.conf file and its share definition.
If this is a globally writable file, and you see a line in the Global section like:
map to guest = Bad User
and a line in the service defintion like:
usershare allow guests = Yes
then make sure that the user "nobody" has access to the directory.
If you use "Security = User" instead, then create a user account for each Windows user and use "sudo /usr/bin/smbpasswd -a <USERNAME>" to add a samba user and the user's password. Also check the permissions on the server's directory being shared. To allow each user to write to the share, but protect a file from being deleted by a non-owner, then set the sticky bit on the directory.
sudo mkdir /usr/srv/music
sudo chown root.root /srv/samba/music
sudo chmod a=rwxt /srv/samba/music
It is up to the file owner whether they want to make a file read only protecting it from being overwritten or modified.
More information and countless variations can be found in the "Samba 3 by Example" and "Samba 3 HOWTO & Reference" from the samba-doc package or from their web site.
If you are sharing an external drive, reformatting it in a Linux native filesystem will allow more granular user & permissions control.
Last edited by jschiwal; 08-30-2008 at 07:02 PM.