Re: R/W access of a vfat partition by any user ?
- From: Garry Knight <garryknight@xxxxxxx>
- Date: Mon, 27 Mar 2006 00:46:19 +0100
Frank wrote:
fda schreef:
Hello. I just connot remember how to modify /etc/fstab so an exchange/dev/hda5 /windows/D vfat umask=000
FAT32 partition will be writable by any user instead of just root.
The 'umask=000' option would mean that every file on the partition will
appear to have rwxrwxrwx permissions. You can fine-tune this. Here's how I
mount my windows partition:
/dev/hda1 /windows vfat users,umask=022,uid=501,gid=100,
iocharset=iso8859-15,codepage=850 0 0
and this is all on one line in my /etc/fstab, and there's no space between
"gid=100," and "iocharset".
The 'users' means this:
users Allow every user to mount and unmount the file system. This
option implies the options noexec, nosuid, and nodev (unless
overridden by subsequent options, as in the option line
users,exec,dev,suid).
The 'umask=022' makes all files and directories have rwxr-xr-x permissions.
This means that I can read and write files and change the names of
directories, everyone else can only enter directories, list their contents,
and read files but not write them. I worked out the '022' by doing a bit of
binary magic (one's-complement) on the permissions I wanted the files to
have. If you want different perms and you don't speak binary, tell us what
you want and no doubt one of us geeks will tell you the umask to use.
The 'uid=501,gid=100' makes all files mounted on /windows have the effective
owner be the user 'garry' and the group 'users'. In other words, I own
everything under that mount point.
The 'iocharset=iso8859-15' makes the Euro symbol (€) display properly in
files. If the OP isn't from Europe, this probably won't be all that
helpful. In that case, 'iocharset=iso8859-1' or 'iocharset=utf8' might be
more appropriate.
The 'codepage=850' sets the codepage for converting shortname characters.
Don't ask me why I chose 850 as I can't remember. I made that decision some
time shortly after I started using Linux in 1998.
The reason you have to use this type of incantation is because Windows
doesn't understand Unix file permissions. And the way round this is to
coerce the system into giving you the perms you want to have. Unfortunately
you can only specify perms and ownership of *all* files and *all
directories* on a vfat mount. It would be nice to have a finer granularity
than that... but then everything's going to be far nicer when MS Windows is
nothing but a memory.
You might care to enter "man:mount" in Konqueror's address bar to learn more
about the above (and other) options. If you don't use Konqueror, open a
virtual terminal or console and enter "man mount" then press 'Q' when
you've finished reading.
Of course, having said all of the above, if you're the only user logged into
your system at any particular time, 'umask=0' will probably suffice.
--
Garry Knight
garryknight@xxxxxxx
.
- References:
- R/W access of a vfat partition by any user ?
- From: fda
- Re: R/W access of a vfat partition by any user ?
- From: Frank
- R/W access of a vfat partition by any user ?
- Prev by Date: Re: My video problems redux
- Next by Date: Re: High-performance notebook with SUSE: any recommendations?
- Previous by thread: Re: R/W access of a vfat partition by any user ?
- Next by thread: How do you manage your Linux documentation ?
- Index(es):
Relevant Pages
|
|