File System permissions
I spent a hour trying to save a file from the web. I kept getting permission errors. So I opened a console window as root. I tried to change permissions with 'chmod' to a+rwx' ; no warning or error messages and the write (w) permission to group(g) and all(a) were not affected. The user and group were 'root', so I decided to change that too. Again no success.
Then it occurred to me that the entire partion might be write protected. so I looked at my Code:
root@VirtualCircuit:~# cat /etc/fstab By the way, I logged out of KDE and back in as root, and no problemo. |
The FAT filesystem cannot support *nix-style permissions, so no amount of chmodding or chowning will ever do you any good on a FAT partition. The permissions must be simulated at mount time, and can be changed with the umask, uid, and gid mount options.
When you use "defaults", the permissions and ownership are set for root, which is why it works when you are logged in as root. So instead of using "defaults", set uid=username, gid=groupname, and umask to equal the inverse of the permissions you want (e.g. umask=000 gives the drive full 777 permissions). |
/etc/fstab
I've read a few similar posts, I just have 2 more questions.
(1) why can't I change some permissions and not others on vfat? (2) please tell me how to modify my fstab file? Quote:
so I replace 'defaults' with 'umask 000' |
(1) Windows VFAT file systems have different attributes stored for files. No UNIX-style users and groups, though it is possible to make a distinction between read-only and write-enabled.
(2) You can modify the fstab file with any editor that you like, but you must have root privileges to do that. Other than that, your settings for /mnt/win are OK - the problem has nothing to do with mounting, but with the the mounted filesystem. Linux Archive |
So this is why...
Sorry to revive an old post like this, but I've got a couple of related questions:
1.) Does NTFS not support Unix-style permissions either (just out of curiosity)? 2.) When I extract files from a tar archive, the file permissions are preserved, even when the tar is saved on another file system. Would this hold true in all cases? |
Quote:
http://pagesperso-orange.fr/b.andre/permissions.html If you use the in-kernel driver you don't have to bother because the write support is "limited" (non-existant if you ask me). Still anything that you need to know should be described on the relevant docs under the Documents subdirectory in your kernel source dir. Quote:
If your fs driver doesn't understand the permissions, then they are ignored. |
All times are GMT -5. The time now is 06:42 PM. |