LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Azureus, FAT32, and File Permissions (https://www.linuxquestions.org/questions/linux-software-2/azureus-fat32-and-file-permissions-232673/)

talkingwires 09-19-2004 06:37 PM

Azureus, FAT32, and File Permissions
 
I'm dual booting Windows XP with Debian. Most of my harddrive is allocated to a FAT32 partition that both operating systems share. I can read and write to the FAT32 partition with Debian, creating documents and things like that. My problem comes is that when I run Azureus, it can't create files on the partition. It has no problem using my /home directory, but it won't touch my FAT32 partion.

Here's my /etc/fstab file:
Code:

# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc            /proc          proc    defaults        0      0
/dev/hda3      /              ext3    defaults,errors=remount-ro 0      1
/dev/hda6      none            swap    sw              0      0
/dev/hdc        /media/cdrom0  iso9660 ro,user,noauto  0      0
/dev/hdd        /media/cdrom1  iso9660 ro,user,noauto  0      0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0      0

#let's try to mount windows, shall we?
/dev/hda5      /windows/media  vfat    defaults,rw,user,umask=000 0 2

The only the only unique thing about my setup is that the FAT32 partion is also designated as the "My Documents" folder in Windows. But as I said before, I have no troubles creating documents with other programs there. Any ideas?

leonscape 09-19-2004 06:49 PM

Drop defaults from the begining of the options.

talkingwires 09-19-2004 07:09 PM

Quote:

Originally posted by leonscape
Drop defaults from the begining of the options.
Do you mean from here?
Code:

proc            /proc          proc    defaults        0      0
Should I replace it with anything, or just delete "defaults" from that line? Sorry if I seem a little slow, but I need to make sure before I start taking out parts of my fstab file.

leonscape 09-19-2004 07:12 PM

/dev/hda5 /windows/media vfat rw,user,umask=0000 0 2

No like above. Also the umask could need an extra 0.

talkingwires 09-19-2004 08:18 PM

Thanks, I'll check it out.

talkingwires 09-21-2004 09:01 PM

It's still not working. :(

I thought that it may have to do with the permissions of /windows/media/, where the partition is mounted. I've been trying to set it up like the /home directory with group/user for /windows being staff/root and the group/user for /windows/media being ben/ben. That would be convient, since /windows/media is My Documents in Windows. Then I could just make a link to it and have My Music, My Pictures, etc in my /home directory. But I can't change the membership/ownership of /windows/media, only /windows, even as root. The recurisive option doesn't work, either. Oh, and I tried mounting /dev/hda5 as /home/ben/media, too.

Here's my current setup:

fstab
Code:

# /etc/fstab: static file system information.
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc            /proc          proc    defaults        0      0
/dev/hda3      /              ext3    defaults,errors=remount-ro 0      1
/dev/hda6      none            swap    sw              0      0
/dev/hdc        /media/cdrom0  iso9660 ro,user,noauto  0      0
/dev/hdd        /media/cdrom1  iso9660 ro,user,noauto  0      0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0      0

#let's try to mount windows, shall we?
/dev/hda5      /windows/media  vfat    rw,users,umask=000 0 0

#hrm, i dunno. some forum post told me to add this when upgrading to 2.6
none /sys sysfs defaults 0 0

Is there any way I can make /windows/media belong to my user id, and not root? Is there any way to get Azureus to be able to write to my FAT32 partition? I'm pulling my hair out here...

leonscape 09-21-2004 09:07 PM

you should have four zeros on umask=0000. You can give a uid or gid for the device.
If your user id is a 1000.

/dev/hda5 /windows/media vfat rw,users,umask=0000,uid=1000 0 0

talkingwires 09-21-2004 09:39 PM

Okay, I set my uid and gid in fstab:
Code:

/dev/hda5      /windows/media  vfat    rw,users,umask=0000,uid=1000,gid=1000 0 0
I show up as the group and owner of /windows/media and everything in it. And I still get this:
http://img.photobucket.com/albums/v6...ureuserror.png

Could this somehow be related to Java? (grasping at straws...)

leonscape 09-21-2004 09:43 PM

Try opening the file in something else. If it opens ( which I think it will ) then its a fault in the program your trying to use. or its set up.

Electro 09-21-2004 09:52 PM

FAT does not support Linux permissions, so you will be stuck to whatever permissions you set through fstab or the mount command. You can add a group called windows and note the gid number. Then specify the gid in your fstab file. Next pick users that you want to have access to the drive by adding them to the group.

After you mount /dev/hda5, make sure you chmod it too 777.

talkingwires 09-21-2004 10:05 PM

Quote:

Originally posted by Electro
FAT does not support Linux permissions, so you will be stuck to whatever permissions you set through fstab or the mount command. You can add a group called windows and note the gid number. Then specify the gid in your fstab file. Next pick users that you want to have access to the drive by adding them to the group.

After you mount /dev/hda5, make sure you chmod it too 777.

I've essentially done that. The fstab specifies the group and owner as ben. Needless to say, I'm a member of ben (it's my uid and gid). The directory is chmod'ed 777. The program is setup properly, because I can download files to /windows/media with it while logged in as root.

I'm at a loss as what else to do. If I modify Azureus' start script to do a sudo before it launches the JAR file, will the files it writes to my directory be owned by root, or will they assume the permissions and ownership of the directory they are written to? I can live with that, I guess...

talkingwires 09-21-2004 10:09 PM

Quote:

Originally posted by talkingwires
If I modify Azureus' start script to do a sudo before it launches the JAR file, will the files it writes to my directory be owned by root, or will they assume the permissions and ownership of the directory they are written to?
I tested it out, and they are owned by me instead of root. I guess that goes back to what you said about FAT32 not supporting Linux file permissions. So I guess I'll just modify the start script for Azureus. And maybe go file a bug report....


All times are GMT -5. The time now is 11:59 AM.