LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't save files to FAT32 drive (https://www.linuxquestions.org/questions/linux-newbie-8/cant-save-files-to-fat32-drive-145965/)

Geoff Cox 02-14-2004 08:24 AM

Can't save files to FAT32 drive
 
Hi

I have Mandrake 9.2, but cannot save files to a FAT32 partition on a second drive on my PC, when I am logged in as user.

I have tried logging in as root - but get the same error message, that I do not have the permissions, even though, when I click on "Permissions" it says that I have write permissions.

I have seen similar questions on this format. Apologies if I am duplicating.

Best regards


Geoff

RobertP 02-14-2004 11:24 AM

How is the partition mounted? Perhaps it is mounted readonly...
mount
cat /etc/fstab
ls -l /dev/hdx or whatever device you use
Will show the desired information.

Geoff Cox 02-14-2004 11:59 AM

Hi

They are all set to ro. It does not matter with some, as my C drive (with XP) is NTFS. The other drives I can use Partition Magic to convert to FAT32, as I have read that it can cause problems trying to write to NTFS drives.

Here is the result of the doing the cat /etc/ftstab:

/dev/hdb9 / ext2 defaults 1 1
none /dev/pts devpts mode=0620 0 0
none /mnt/cdrom supermount dev=/dev/hdc,fs=udf:iso9660,ro,--,iocharset=iso8859-15 0 0
none /mnt/cdrom2 supermount dev=/dev/scd0,fs=udf:iso9660,ro,--,iocharset=iso8859-15 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,codepage=850,iocharset=iso8859-15,sync,umask=0 0 0
/dev/hda1 /mnt/win_c ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hdb5 /mnt/win_c2 ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hda5 /mnt/win_d vfat ro,iocharset=iso8859-15,umask=0 0 0
/dev/hdb6 /mnt/win_d2 ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hda6 /mnt/win_e ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hdb7 /mnt/win_e2 ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hda7 /mnt/win_f ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hdb8 /mnt/win_f2 ntfs ro,iocharset=iso8859-15,umask=0 0 0
none /proc proc defaults 0 0
/dev/hdb10 swap swap defaults 0 0
[geoff@localhost geoff]$

How do I change the ones that I need to change?

Best regards

Geoff

jschiwal 02-14-2004 12:13 PM

I assume that you want to write to hda5. If you are the only user on the computer, you may want to add the options uid=gcox,gid=gcox. I assumed that your user name is gcox, substitute your own user name or user/group id. If there are others you can create a group that will allow you to access this drive.
By using user and group permissions instead of the users option, The drive is more secure incase someone can gain remote access to your computer. However, I don't understand why root wasn't able to write to the drive.
Your fstab entry should then look like this:
Code:

/dev/hda5 /mnt/win_d vfat iocharset=iso8859-1,codepage=850,uid=gcox,gid=gcox,umask=0 0 0
Also, Mandrake sets up a group called fileshare for the purpose of sharing access to drives. To allow another user to access the drive, add the user to the fileshare group and change the fstab option to gid=fileshare.

michaelk 02-14-2004 12:17 PM

If you have a vfat partition on your hdb then there isn't an entry in your /etc/fstab. Add a line like hda5.

Quote:

/dev/hda5 /mnt/win_d vfat ro,iocharset=iso8859-15,umask=0 0 0
BTW the option ro means readonly and umask=0 means read / write for all. Since umask is after ro option it will take precedence. Since NTFS module is read only umask=0 will not work.

Geoff Cox 02-14-2004 12:32 PM

Hi

What do you recommend as an editor? I remember using vi many, many years ago when I was learning a bit of Unix - very unintuitive! I can use it, but if there is a simpler text editor, I would prefer to use it.

I assume that I just remove the ro from the string? I can also add the other things that you suggest.

Do the changes take immediate effect or do I need to reboot ?- spoken like an experienced Windows user!

Best regards and thanks


Geoff

RobertP 02-14-2004 12:48 PM

I recommend vi for its simplicity. You only need to know a couple of commands to use it for this purpose. "I" puts you in insert mode. <esc>:q or wq gets you out.

You can use a GUI like gedit or kate but many prefer not to use a GUI as root.

Geoff Cox 02-14-2004 02:08 PM

Hi

I have tried editing /etc/fstab. I think that there should have been a comma after the vfat. However, now I cannot even open win-d.

Here is my fstab:

[geoff@localhost geoff]$ cat /etc/fstab
/dev/hdb9 / ext2 defaults 1 1
none /dev/pts devpts mode=0620 0 0
none /mnt/cdrom supermount dev=/dev/hdc,fs=udf:iso9660,ro,--,iocharset=iso8859-1 5 0 0
none /mnt/cdrom2 supermount dev=/dev/scd0,fs=udf:iso9660,ro,--,iocharset=iso8859 -15 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,codepage=850,iocharset= iso8859-15,sync,umask=0 0 0
/dev/hda1 /mnt/win_c ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hdb5 /mnt/win_c2 ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hda5 /mnt/win_d vfat,iocharset=iso8859-15,codepage=815,uid=geoff,gid=filesh are,umask=0 0 0
/dev/hdb6 /mnt/win_d2 ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hda6 /mnt/win_e ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hdb7 /mnt/win_e2 ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hda7 /mnt/win_f ntfs ro,iocharset=iso8859-15,umask=0 0 0
/dev/hdb8 /mnt/win_f2 ntfs ro,iocharset=iso8859-15,umask=0 0 0
none /proc proc defaults 0 0
/dev/hdb10 swap swap defaults 0 0
[geoff@localhost geoff]$

What have I done wrong? Just to say that I have put spaces after each comma, which is how it looks in the terminal view.

When I go into Mandrake Control Centre, and look at the mount option, it identifies the drive as:

Type: vfat,iocharset=iso8859-15,codepage=815,u

This does not seem correct.

Any thoughts?

Best regards


Geoff

Geoff Cox 02-14-2004 02:14 PM

I have just seen that I have misspelled fileshare as filesh are!

Geoff Cox 02-14-2004 02:16 PM

Having said that, it may be the way in which the copy command worked, as the word fileshare went across to the next line.

michaelk 02-14-2004 08:40 PM

Quote:

/dev/hda5 /mnt/win_d vfat,iocharset=iso8859-15,codepage=815,uid=geoff,gid=filesh are,umask=0 0 0
There needs to be a space inbetween each section of an entry. You are correct there should be a space between vfat and iocharset=iso8859-15...

Geoff Cox 02-15-2004 09:51 AM

Hi

In the original, there are spaces. What does the codepage=815 mean? Why do none of the others have it there?

Cheers

Geoff

jschiwal 02-16-2004 05:36 AM

Since FAT32 drives are windows creation, you want to use the same codepage that windows does.

Geoff Cox 02-17-2004 07:27 AM

Hi

I decided that the simple way out was to change all my data drives to FAT32 and reinstall Linux, which I did, and now I can read and write to my data drives even as "user" and not root.

Many thanks for all those who helped me with their contributions.

Cheers

Geoff


All times are GMT -5. The time now is 12:10 AM.