Re: Trying to open Fat32 partition in NVU success



On Thursday, 23 February 2006 16:56, Kevin Cole wrote:
On Wed, Feb 22, 2006 at 10:36:04PM -0500, William Wereley wrote:
I found the partition listed under media. Strange place to me,
but I'm learning. An old dog but not unteachable. I have tried a
few ways to change the permissions so I can edit those files, NVU
can edit but not save. So sudo into nautilus and that doesn't
work. Went into Win2000 and set them as shares, no help. Hmmm
seems I need to do some terminal work.Anyone have any suggestions
I've poured through google and the wiki, tried to sudo chmod 775
and nothing 777 nothing. I definately missing something and will
feel like a jerk when I discover how easy it probably is.
Anybody, please set on the right path.
Thanks

Hey Bill,

It has been a while since I've done this, but as I recall, you
will want to add something in your /etc/fstab that forces the
FAT32 partition to "have a user and group id". Linux (among
other OS's) assigns an user ID (UID) and group ID (GID) to
each file. The partitioning schemes are set up to accomodate
that. FAT32 offers no such fields, so they have to be sort
of inferred. In /etc/fstab you can tell it to map everything
in a FAT32 partition to a single user and group. The default
first user id assigned in Ubuntu for regular users is 1000.
Ditto for group id. So, in the options area a "uid=1000,gid=1000"
may help you out.

the rw and ro options simply tell the kernel to permit or not permit
writes to the file system. Has nothing to do with specific
permissions, that's the next step

uid and gid assign a specific owner and group to all files/dirs like
Kevin says

umask sets the permissions applied to all those files and dirs - it
works exactly like the umask command in the shell, indicating the
permissions you DON'T want applied.

dmask and fmask are like umask but applied seperately to files and
dirs. This is very useful as umask=0000 makes all files executable,
which doesn't make sense on a vfat partition and you lose the feature
of colorizing the output of ls according to file type.

Long ago I got fed up with mount defaults changing between versions,
so now I prefer to explicitly set all relevant options and save
myself later hassle.

On a single user machine you probably want rwxrwxrwx for directories
and rw-rw-rw- for files (exactly what Windows gives you). This does
it:

/dev/hda2 /mnt/vfat vfat rw,dmask=0000,fmask=0111 0 0

A more complex example, I need to share some vfat partitions between
several users (and exclude others). I want the valid users to have rw
permissions, and everyone else to have no permissions at all. The
valid users all belong to group users (gid=100)

/dev/hda2 /mnt/vfat vfat rw,gid=100,dmask=2007,fmask=0117 0 0

--
Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • [SLE] Re: [CLUG-tech] Question about umask in fstab
    ... which gives the files permissions of rwxrwxr-x. ... > trying to adjust the umask value to provide this. ... When I run ls -l on the root of the mounted partition all ...
    (SuSE)
  • Re: mounting a fat32 partition, allowing all users
    ... > The user that mounts the partition is the only that gets permission to ... but for user jpcl instead of root) ... Particularly, the uid, gid and umask options. ... permissions of 777: ...
    (Debian-User)
  • Re: writing to windoze partition
    ... > Umask of 222 turns off write permissions on all files and is suggested ... >> The windoze partition mounts okay and I can change directories, ... and shrink you ntfs partition down in size and then create a vfat32 with the ...
    (Fedora)
  • Re: How do I change permissions
    ... >> FAT32 doesn't have permissions. ... You set the umask to simulate ... >> for the entire entire partition. ... You also have to mount it rw. ...
    (alt.os.linux.suse)
  • Re: Security of data in memory
    ... swap partition, key protection, secure data deletion. ... being stolen or otherwise disclosed they will often respond with filesystem ... permissions on a file, user, group and other as a bare minimum. ...
    (SecProg)