LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't delete folders made by XP under unbunu on fat32 partition (https://www.linuxquestions.org/questions/linux-newbie-8/cant-delete-folders-made-by-xp-under-unbunu-on-fat32-partition-351935/)

Tristan9669 08-10-2005 04:16 PM

Can't delete folders made by XP under unbunu on fat32 partition
 
I created a fat32 partition and I moved some folders in it with XP and when I'm under ubuntu it wont let me delete the folders or its contents. It also has a lock icon on the folders made by xp
http://img361.imageshack.us/img361/1798/error8pp.png
http://img361.imageshack.us/img361/7955/lock7wl.png

Matir 08-10-2005 04:29 PM

You may need to mount the partition so you have write permissions. Add "umask=000" to the mount options in /etc/fstab, and remount the drive. Or 'mount -o remout,umask=000 /media/G'.

Grobbendonk 08-10-2005 04:35 PM

First thing to check is that the mount command you've used to mount the disk has the correct permissions.

So, just type mount to see what is mounted (and where) - I've got a FAT32 disk on my machine...

/dev/hda1 on /mnt/xp/C type vfat (rw,noexec,nosuid,nodev,gid=100,umask=0002,utf8=true)

Note the rw on the beginning of the options - it means "mount read/write"

My /etc/fstab says
/dev/hda1 /mnt/xp/C vfat users,gid=users,umask=0002,utf8=true 0 0


Second (and this is the one that I always miss!), make sure your user has write privilege on the actual mount point.

nic@avon:~> ls -l /mnt/xp
total 24
lrwxrwxrwx 1 root root 1 2005-05-27 16:19 c -> C
drwxrwxr-x 23 root users 4096 1970-01-01 01:00 C

(I've got a symbolic link because I use software that is occaisionally case sensitive)

If it's not the mount point, or the mount command, then it's a bit more difficult - let us know if it's neither of these!

Tristan9669 08-10-2005 04:40 PM

Quote:

Originally posted by Matir
You may need to mount the partition so you have write permissions. Add "umask=000" to the mount options in /etc/fstab, and remount the drive. Or 'mount -o remout,umask=000 /media/G'.
didnt work, same problem

Matir 08-10-2005 04:47 PM

Please post the output of the 'mount' command, as well as ls -l /media/G.

Tristan9669 08-10-2005 04:50 PM

Quote:

Originally posted by Grobbendonk

Second (and this is the one that I always miss!), make sure your user has write privilege on the actual mount point.

nic@avon:~> ls -l /mnt/xp
total 24
lrwxrwxrwx 1 root root 1 2005-05-27 16:19 c -> C
drwxrwxr-x 23 root users 4096 1970-01-01 01:00 C

(I've got a symbolic link because I use software that is occaisionally case sensitive)

If it's not the mount point, or the mount command, then it's a bit more difficult - let us know if it's neither of these!

I don't understand what youre say here in the last part. Also, how do I check if I have write privilege on the mount
here is how my /etc/fstab looks like
/dev/hda5 /media/G vfat iocharset=utf8,umask=000 0 0

Tristan9669 08-10-2005 05:04 PM

Quote:

Originally posted by Matir
Please post the output of the 'mount' command, as well as ls -l /media/G.
tristan@TRISTAN:~$ mount
/dev/hdb1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda5 on /media/G type vfat (rw,iocharset=utf8,umask=000)
/dev/hda1 on /media/C type ntfs (rw,nls=utf8,umask=0222)
/dev on /.dev type unknown (rw,bind)
none on /dev type tmpfs (rw,size=5M,mode=0755)
usbfs on /proc/bus/usb type usbfs (rw)
tristan@TRISTAN:~$ mount -l /media/G
mount: according to mtab, /dev/hda5 is already mounted on /media/G
mount failed
tristan@TRISTAN:~$

Matir 08-10-2005 09:16 PM

ls -l /media/G, not mount -l :)

Grobbendonk 08-11-2005 04:55 PM

>I don't understand what youre say here in the last part.
No problem, I'm not great at explaining stuff!

Anyway, you've given us more to go on - this line from your "mount" display is useful and tells us that there's nothing wrong with your fstab (although many would recommend changing the umask to 002). The rw on the /dev/hda5 line means "this partition accepts read and write access". So it's not that, it must be permissions on something else.

The next one - as Matir says, we need to see the result from ls -l /media

What we're looking for is the permissions on the mount point. The mount point is an existing directory which is effectively overlaid with the root of the partition when the mount command is issued. The problem I was trying to explain was that when the mount happens, the permissions of the mount point apply to the newly mounted partition.

When you created the mount point ( /media/G ) it's quite likely that it was created with read-only permissions (except for the root user), and to allow the user tristan to write/delete, you need to open these up a bit!

Matir 08-11-2005 06:20 PM

Actually, mount point permissions are completely overriden by mount options (and, on *nix filesystems, the filesystem itself). But still, seeing permissions for the top-level directory and contents would be useful.

Tristan9669 08-11-2005 07:17 PM

I got everything to work, thanks for the help

Matir 08-11-2005 07:39 PM

Tristan9669: Glad to hear that you got it to work. Mind sharing your solution that we and others may be enlightened by it?

Tristan9669 08-11-2005 08:02 PM

I can't belive I didn't think of it before, I boot up xp and deleted the folders that were locked (some wren't) and then I boot back in ubuntu and mounted the fat32 partition and then mounted the ntfs partition that I originally copied the files from under xp and I then copied the files from the ntfs partition to the fat32 partition.

Matir 08-11-2005 08:08 PM

A bit of a workaround, but hey, whatever works.


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