File permissions on mounted FAT drive
Hi, I'm running Debian on a Linksys NSLU2. All working great except I can't seem to get write permissions for anyone other than root on my second USB drive, which is FAT. The hardware is mounting fine and root can read and write.
The entry in fstab is this: /dev/sdb1 /media/usb500 auto rw,users,auto 0 0 When the device is NOT mounted, the perms are as follows: drwxrwxrwx 2 darren root 4096 Nov 5 23:32 usb500 As soon as it's mounted, they change to this: drwxr-xr-x 11 root root 32768 Jan 1 1970 usb500 I think I understand why the perms defaut back to this (system is making assumptions in the absence of file data on the FAT drive?), but I can't figure out how to get those all-important w's back. Attempting to chmod after mounting has no effect on the usb500 directory and throws errors on everything inside. I've tried changing auto to vfat in fstab and that didn't help. I've also attempted to mount manually using -0 gid=darren, and that almost works in that the owner remains darren, but it still doesn't give me the write perms I need. If anyone can help me I'd be very grateful. cheers Darren |
Hi -
Look here: http://ubuntuforums.org/showthread.php?t=402813 Quote:
|
No that didn't get it. Tried a umount followed by a manual mount with -o umask=0. it mounted ok but the write permission is still missing.
|
Hi -
You're either missing something in the "mount" command, or Debian doesn't recognize it as a "read-write" device. A couple of suggestions: 1. Forget about fstab and focus on "mount" (at least for debugging) 2. Focus on "vfat" filesystem type (at least for debugging) 3. Check output from "lsusb" and /proc/usb/NNN http://linux.die.net/man/8/lsusb 4. Check for errors/diagnostic info in the system logs, e.g. dmesg | less less /var/log/syslog etc. Here are another couple of links that might help: http://ubuntuforums.org/showthread.php?t=803881 http://www.mepis.org/node/2105 |
The vfat umask option should really work. As someone said above, vfat doesn't store the linux permissions info because it simply lacks the support to do so.
Mount it and double check the output of "mount" without arguments to see that all the options have been applied correctly. We assume that the drive has not some kind of physical write protection mechanism, that can be easily checked using root and trying a write. |
Thanks for all your suggestions. I've got to get to work now but I'll try again this evening.
(in the meantime I'm seriously considering a re-format to ext3 and am copying data off in preparation!) |
FAT file systems do not have UNIX-style permissions. If your device is mounted correctly in a way that every user has read-write access, then any user will be able to read-write.
The fact that only root can write to the device means that your way of mounting is faulty. Check the /etc/fstab file to see the current settings. If you do mount by hand as root, then explicitly give an option to give write permission to anyone. Otherwise only root can write. |
It's worth mentioning that FAT really isn't suitable for Windows anymore, either!
Why not re-format the drive to a more suitable format... one that does recognize permissions. It may take a little digging, but both Windows and Linux support the idea of "installable file systems" and they both support quite a few. Realistically, most shared-storage these days is network attached anyway. They are specialized devices that consist of storage controllers, network interfaces and lots of disk-drives. And they're cheap. Apple sells one (and it looks "way cool!") but they didn't really plow any new ground to do it. |
Well, that one is going to have to remain a mystery. I've been through every link posted, every combination of mount commands I could think of, and I still could only get write permissions as root.
So I now have a shiny new ext3 file system that's sharing everything with correct permissions via Samba. I could go off Windows you know... thanks for the help anyway. |
All times are GMT -5. The time now is 12:23 PM. |