LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   unable to create or delete files on fat32 partition (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-create-or-delete-files-on-fat32-partition-394036/)

Barrett 12-17-2005 09:03 PM

unable to create or delete files on fat32 partition
 
On the partition where I keep most of my documents, I can read and write files but unfortunately cannot create or delete files unless logged in as root. This is inconvenient :{ The computer is dual boot with XP and Mandriva 2006 64. My fstab is below. The partition in question is in the 5th line and is called 'MotherWindows.' Any ideas? Thanks much, Barrett


/dev/sdb5 / ext3 defaults 1 1
/dev/sdb9 /home ext3 defaults 1 2
/dev/sda1 /mnt/C ntfs umask=0022,nls=utf8,ro 0 0
/dev/hda1 /mnt/F ntfs umask=0022,nls=utf8,ro 0 0
/dev/sdb1 /home/barrett/mnt/MotherWindows vfat exec,iocharset=utf8,uid=500,gid=barrett,user,rw 0 0
/dev/sdd1 /home/barrett/mnt/alubox vfat exec,iocharset=utf8,uid=500,gid=barrett,user,rw 0 0
/dev/hdb /mnt/cdrom auto umask=0022,user,iocharset=utf8,noauto,ro,exec,users 0 0
/dev/hdc /mnt/cdrom2 auto umask=0022,user,iocharset=utf8,noauto,ro,exec,users 0 0
/dev/hdd /mnt/cdrom3 auto umask=0022,user,iocharset=utf8,noauto,ro,exec,users 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0022,iocharset=utf8,sync 0 0
none /proc proc defaults 0 0
/dev/sdb10 /tmp ext3 defaults 1 2
/dev/sdb7 /usr ext3 defaults 1 2
/dev/sdb8 /var ext3 defaults 1 2
/dev/sdb6 swap swap defaults 0 0
/dev/sdc1 /mnt/256CF vfat pamconsole,exec,noauto,noatime,iocharset=utf8,managed 0 0

mebrelith 12-17-2005 09:25 PM

Change your line for this and it should work peachy:
Code:

/dev/sdb1 /home/barrett/mnt/MotherWindows vfat user,owner,utf8,rw,umask=000 0 0
Thats pretty much how I have it at my box (well, ok diff names of folders and such :) ) and it works.

Barrett 12-18-2005 02:28 PM

Sorry for my slow reply, I had to be away from my computer for a few hours. Thanks much for your help.

Your fstab line did what it was supposed to do. It turns out, though, that the problem was that some key directories had had their permissions changed. I have no idea how that happened...

barrett

Hosiah 12-18-2005 02:44 PM

Quote:

It turns out, though, that the problem was that some key directories had had their permissions changed. I have no idea how that happened...
Oh, I get that all the time! :) I move files from floppy to home directory while logged in as root, then unzip and unpack them and delete the original tarball, forgetting that each of the files created in this process still belong to root. The root access is kind of "viral" that way: Anything you touch while running in root or su mode is likely to change it's ownership to root. Some systems are more zealous about this than others.

J.W. 12-18-2005 03:24 PM

This may be off topic, but FAT32 partitions do not (ie, cannot) recognize Linux file permissions

Barrett 12-20-2005 02:08 PM

I don't know if the file permissions were changed in XP or linux. I had installed a new router and was marking folders to be shared over my local lan. I did this in the same partition on the same PC while it was running XP and later Linux. I have since discovered that in XP the default is that shared files are read-only for network users. I am still too newbie to have a clear grasp of how badly I may have messed up in Linux. But I was able to solve the problem in Linux with something like "chmod +w Directory".

tkedwards 12-20-2005 05:02 PM

FAT32 partitions have no permissions wether you're in Linux or Windows - the umask option on the amount tells Linux what permissions it should pretend that the FAT32 partition has. There is also the permissions of the mount point on the Linux side - ie. the directory that it is mounted in. Sometimes if they are wrong it can stop you accessing the mounted partition and that is probably what you fixed with your chmod.

Barrett 12-21-2005 10:26 AM

It could be that I have a vocabulary problem. When I setup file sharing in XP, there are switches for allowing or not allowing other users read-only access or read-and-write access. Is this different than 'permissions'?

I had a umask statement with a lot of zeros in fstab, and the directories will still read-only.

There is also another bit of the story, which is that the directories that mysteriously became read-only had a soft link to my linux partition, which is, I believe, an ext partition.

Thanks for your help. It's really good to learn.

linuxlastslonge 12-21-2005 10:42 AM

this may be off topic as well, but, in reply to:

Quote:

This may be off topic, but FAT32 partitions do not (ie, cannot) recognize Linux file permissions
there is a handy application that can read ext2/ext3 partition from windows:

http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm


this is useful for transfering files without the hassle
of using cd's or floppies.

tkedwards 12-21-2005 04:19 PM

Quote:

It could be that I have a vocabulary problem. When I setup file sharing in XP, there are switches for allowing or not allowing other users read-only access or read-and-write access. Is this different than 'permissions'?
It depends what you mean by 'file sharing'. Both Windows and Linux have seperate ACLs for file shares - in Windows its set on the 'Share' tab of the properties for that folder, in Linux its set in /etc/samba/smb.conf or one of the many GUI samba frontends (Swat, Webmin Samba Module etc.). Both systems also have permissions on the underlying files as well.


All times are GMT -5. The time now is 06:44 AM.