kanotix.com

Installation - Mount FAT32 shared partition with 'write' access

coady - 18.12.2006, 12:33 Uhr
Titel: Mount FAT32 shared partition with 'write' access
I have a simple but annoying problem. I want to automatically mount a shared data partition at boot-up in order to read/write data and to share email and web browser information. I have a separate partition formatted to FAT32 (vfat). I have created a mount point (/winshare) and added a line to '/etc/fstab'. For various reasons I would prefer to have an independent mount point rather than mounting it in '/home/user_name' (where I assume I would have read/write access by default). However, while the partition mounts, I can see and access the data, I cannot get write permission.

Here is the relevant information.

$ mount:
Code:
/dev/sda2 on /winshare type vfat (rw,uid=1000,gid=1000)

'/etc/fstab':
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>     <options>             <dump>  <pass>
proc            /proc           proc       defaults              0       0
usbfs           /proc/bus/usb   usbfs      devmode=0666       0   0
sysfs           /sys            sysfs      defaults              0       0
tmpfs           /dev/shm        tmpfs      defaults              0       0
/dev/sda5       /               reiserfs   defaults              0       1
/dev/sda1       /media/sda1     ntfs      ro,umask=000,nls=utf8      0       0
/dev/sda2       /winshare   vfat      auto,rw,uid=1000,gid=1000 0       0
/dev/sda6       /home      ext3      defaults              0       0
/dev/sda7       none            swap      sw                    0       0
/dev/hdc        /media/cdrom0         udf,iso9660 user,noauto      0       0OC


I have tried mounting the partition using <options>:
"rw,auto,users"
and
"defaults"
as well as what you can see above
"auto,rw,uid=user_name,gid=group_name"

I have also tried to run '# chmod' on the mount point, for e.g., '# chmod ug+w /winshare' but while I can change all these options, I cannot change the write permission.

Can anyone advise me on this? Thanks.

coady
Kano - 18.12.2006, 12:43 Uhr
Titel: RE: Mount FAT32 shared partition with
Sample entry for UTF8 systems:

/dev/sda2 /media/sda2 vfat exec,umask=000,shortname=mixed,quiet,iocharset=utf8 0 0

remove ",iocharset=utf8" if no UTF8 is in

echo $LANG
coady - 18.12.2006, 14:35 Uhr
Titel:
I tried the following, but it doesn't work:
Code:
/dev/sda2       /winshare   vfat      rw,auto,umask=0000,uid=1000,gid=1000,iocharset=utf8   0       0
I am not sure why? I have tried other combinations too.
Is the problem the location of the mount point in the file system?
Note, utf8 is set in LANG.

coady
penguin.ch - 18.12.2006, 14:39 Uhr
Titel:
Not sure if this is important, but the value for umask consists of 3 digits (not 4, as you posted).
coady - 18.12.2006, 14:43 Uhr
Titel:
penguin.ch hat folgendes geschrieben::
Not sure if this is important, but the value for umask consists of 3 digits (not 4, as you posted).
Thanks, you are correct. It should be "umask=000" and not "umask=0000".
coady
penguin.ch - 18.12.2006, 14:57 Uhr
Titel:
Just in case your problem remains unsolved: the entry referring to my "file share" looks like this:

Code:

/dev/sdf1 /data vfat rw,users,uid=1000,gid=1000,umask=022 0 0

Remark, although possibly silly: have you checked the UID / GID of the user in charge?

HTH
Birdy
Kano - 18.12.2006, 15:20 Uhr
Titel:
Are you too stupid to use the example I told you? You do NOT need uid/gid.
coady - 18.12.2006, 20:13 Uhr
Titel:
Kano hat folgendes geschrieben::
Are you too stupid to use the example I told you? You do NOT need uid/gid.
No. I am not too stupid. I have just been trying to figure out why this won't work.

I have entered the following setting in '/etc/fstab':
Code:
/dev/sda2 /media/sda2 vfat exec,umask=000,shortname=mixed,quiet,iocharset=utf8 0 0

command "mount" looks like this:
Code:
/dev/sda2 on /media/sda2 type vfat (rw,umask=000,shortname=mixed,quiet,iocharset=utf8)

command "ls -l" looks like this:
Code:
drwxrwxrwx 6 root root 4096 1970-01-01 01:00 sda2
It should work, but I can't write to "/dev/sda2". The strange thing I noticed here is the date (i.e. "1970-01-01 01:00").

It is frustrating for me too...

coady
horo - 19.12.2006, 07:54 Uhr
Titel:
Zitat:

It should work, but I can't write to "/dev/sda2". The strange thing I noticed here is the date (i.e. "1970-01-01 01:00").

Don't write to /dev/sda1 - use /media/sda1 instead!

Ciao Martin
coady - 19.12.2006, 08:54 Uhr
Titel:
Thanks to everyone who helped here. I now have read/write access to the shared partition.
coady
Richard - 19.12.2006, 15:27 Uhr
Titel:
@coady:
You are a paragon of restraint.

Auf Wiedersehen.
coady - 19.12.2006, 18:37 Uhr
Titel:
Richard hat folgendes geschrieben::
You are a paragon of restraint
Richard,
There were a number of small problems that existed together.
- One was that I had a typo in the "umask" entry, 'umask=0000' whereas it should be 'umask=000'.
- The 'utf-8' flag is set in LANG, but I tried both ways, and it doesn't seem to be the problem. I can read/write with or without 'utf-8' in the 'fstab <options>'.
- It also looks like when I issued the "chmod" command on the mount point that, either I did not do it correctly, or I did not run it recursively, or some other oversight (I tried this many times, but perhaps should have been more systematic). There were a handful of folders down within the file structure that remained write protected. When I looked at the mount point and the main file/directory elements they all had read/write permission, but not some of the deeper directories. I found this by carefully looking through the layers of directories and running "ls -l". I am not certain but I think this may be related (or not) to setting special folder attributes in windows xp. It was only folders that had not standard icon attributes that did not also have write access. Again, I am not certain about the reasons, however. I hope this makes it clearer. Thanks again to everyone who helped out.

regards,
coady
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007