Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Full access to FAT32 Partition in SUSE 10.0


  • Please log in to reply

#1
Pi rules

Pi rules

    Member

  • Member
  • PipPipPip
  • 634 posts
I created a 10 GB FAT32 partition so I could access files in both Windows XP and SUSE (KDE), along with any other Linux distros I decide to try out. However, I have read-only access to the partition, so I tried to fix it. I opened Konsole and typed su, then pressed enter and typed my password, and then I typed Konqueror to open it in superuser mode. I then navigated to the partition, right-clicked it then clicked Properties, and went to the Permission tab. I changed everything to "Can View and Modify Content", checked the box to apply the changes to all subfolders/files, and clicked OK. However, it didn't work, so does anybody know how you are supposed to do it?

Edit: I'll just post the solution here since there have been a lot of views.

Open fstab by opening Konsole and type:
sudo kWrite /etc/fstab
then type your superuser password.

Here is the code in my fstab:
/dev/hdb2			/shared			  vfat	   rw,users,gid=users,umask=0002,uid=1000,utf8=true,exec,dev,auto		0 0
rw means read/write access to it, users and gid=users make the partition belong to the group "users", uid=1000 gives ownership of the partition to the user with the ID 1000, and for more information, see here

Edited by Pi rules, 10 December 2005 - 12:59 PM.

  • 0

Advertisements


#2
Tyger

Tyger

    Member 2k

  • Member
  • PipPipPipPipPip
  • 2,896 posts
Have tried following the same procedure in Windows?
  • 0

#3
pandra

pandra

    Member

  • Member
  • PipPip
  • 10 posts
OK, first, it could be pretty easier if you tell the SuSE's version and the name of the partition you created (/dev/hda1, /dev/hda2, /dev/hdb1, etc).

For this example, let's suppose that you created the 10GB fat32 partition /dev/hdc1 and you're using SuSE 9.0 or later.

1.- You hace to create a "mountpoint" for your partition, that means, the folder that you will use to access the partition. (like c: or d: under windows) This folder can have any name you want, say "myfat32part".
linux:~ #cd /
linux:/ #mkdir myfat32part
2.- Remember linux:~ # is the same that c:\Document and Settings\root> in MS-DOS and linux:/ # is the same that c:\>
so, you said that the partition is already mounted. Let's unmount it
linux:/ #unmount /dev/hdc1

3.- Now the partition in not mounted and you can mount it where you want, in particular, the mountpoint defined in 1.
linux:/ #mount -w /dev/hdc1 /myfat32part

Done! this should work.

The other way is to change /etc/fstab file.

Here is an example:
linux:/ #more /etc/fstab
/dev/hda6 / reiserfs acl,user_xattr 1 1
/dev/hda1 /windows/C ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hdc1 /windows/D vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/hda5 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
sysfs /sys sysfs noauto 0 0

This is a shot of my etc/fstab.

What you need to do is to add in the fourth column (in the row of your fat32 partition) the option "rw" so, after the add, the row should look like this:

/dev/hdc1 /windows/D vfat rw,users,gid=users,umask=0002,utf8=true 0 0

After this the system will mount the partition as a read/write one in the /windows/D folder. Note that here is where you can change the default mountpoint. May you wold like to do:
/dev/hdc1 /myfat32part vfat rw,users,gid=users,umask=0002,utf8=true 0 0

Ahny of the other above must work for you.
  • 0

#4
Pi rules

Pi rules

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 634 posts
The version (10.0) is in the title and my user info., but I probably should have included it, along with the mountpoint (shared), and the partition (/dev/hdb2, I believe).

I'll try it next time I enter SUSE, but I have to work until close tonight, so it might not even be this weekend.
Thanks for your assistance! :tazz:
  • 0

#5
Pi rules

Pi rules

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 634 posts
I edited /etc/fstab (opened Konsole and typed):
sudo kWrite /etc/fstab
then changed the entry to:
/dev/hdb2			/shared			  vfat	   rw,users,exec,auto			  0 0
And, it worked!

Just in case anybody has a question about /etc/fstab, look here.

Thanks to everyone who helped! :tazz:
  • 0

#6
Pi rules

Pi rules

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 634 posts
I spoke too soon. I just downloaded some updates, and now it is back to normal. I checked fstab and it's the same, but the owner changed back to root. Any ideas?
  • 0

#7
pandra

pandra

    Member

  • Member
  • PipPip
  • 10 posts
Why don't you let me see a shot of your fstab?
I'm shure that we can do something good with that.
  • 0

#8
Pi rules

Pi rules

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 634 posts
/dev/hda6			/					reiserfs   acl,user_xattr		1 1
/dev/hda1			/windows/C		   ntfs	   ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hdb1			/windows/D		   ntfs	   ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hda5			swap				 swap	   defaults			  0 0
proc				 /proc				proc	   defaults			  0 0
sysfs				/sys				 sysfs	  noauto				0 0
usbfs				/proc/bus/usb		usbfs	  noauto				0 0
devpts			   /dev/pts			 devpts	 mode=0620,gid=5	   0 0
/dev/cdrecorder	  /media/cdrecorder	subfs	  noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0			 /media/floppy		subfs	  noauto,fs=floppyfss,procuid,nodev,nosuid,sync 0 0
/dev/hdb2			/shared			  vfat	   rw,users,exec,auto			 0 0
/dev/hdb5			/Xandros			 reiserfs   defaults			  1 2

The /shared line (2nd to last) is the one you are looking for.

I can unmount the drive (it's set to auto mount with SUSE) then mount it, and I will be the owner, and everything will be OK, but when I start up, it's read only.

Edited by Pi rules, 05 November 2005 - 02:52 PM.

  • 0

#9
pandra

pandra

    Member

  • Member
  • PipPip
  • 10 posts
OK, let me see... You aren't the root user. So when SuSE starts up the /dev/hdb2 partition is automatically mounted but you are not the owner. Do you mean "the owner of the shared folder"?.
If this is the problem, it's obvious that you will not have full access to your partition since you don't have access to the mountpoint.
If the owner of the "shared" folder is "root" maybe it could be a good idea to use chown to make it yours.
I mean, if your username is "foo" then you should type (as the real folder's owner):
chown foo shared

Now you are the real folder's owner and the only thing you hace to do is to give it the right permissions:

chmod g+rwx shared

After this you'll have full access to the folder.


But, if everything is OK with the folder, you can use an (not the best, but) easy solution.
If you can solve the problem by re-mounting the partition, add the commands (prefixed with "su -c") to your /etc/profile.local

What you exactly need to add to this file is:
su -c 'umount /dev/hdb2' foo
su -c 'mount -w /dev/hdb2 /shared' foo

This should work while we find a better solution.
Good luck
  • 0

#10
Pi rules

Pi rules

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 634 posts
When I try chown, I get this:

chown: changing ownership of `/shared': Operation not permitted

I was in superuser mode when I tried it.

Also, I don't have a /etc/profile.local, just /etc/profile that tells me to make any changes in /etc/profile.local, but I can't find it. And, do you need to add su ... or sudo ....?

Edited by Pi rules, 07 November 2005 - 01:50 PM.

  • 0

Advertisements


#11
pandra

pandra

    Member

  • Member
  • PipPip
  • 10 posts
If you don't have an /etc/profile.local you need to create it in the same path (/etc/).

Adding "su -c" let's root to execute a command as a different user (you in this case).

There is another way:
Let's supose that your username is "foo" so, you can edit (or create) the /home/foo/.profile file. This is almost like editing /etc/profile.local but this changes just apply to a single user account (foo in this case).
So you can edit your own .profile with this lines:

umount /dev/hdb2
mount -w /dev/hdb2 /shared

About the error you get with the chown command:

Did you create the "shared" folder?

If the "shared" folder is a system folder, nobody can changes it's owner.
If this is right, why don't you create your own mountpoint folder?
  • 0

#12
Pi rules

Pi rules

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 634 posts
I modified the /home/user/.profile file, and now whenever I start SUSE, the partition is unmounted. I'm going to try a few more things. I'll edit this if I get something to work.
Edit: I got it to work (for now at least). Thanks. :tazz: Here's a copy of the uncommented part of my .profile:
test -z "$PROFILEREAD" && . /etc/profile
umount /shared
mount /shared

About the error you get with the chown command:

Did you create the "shared" folder?

If the "shared" folder is a system folder, nobody can changes it's owner.
If this is right, why don't you create your own mountpoint folder?

The shared folder is the mount point for that partition.

Edited by Pi rules, 07 November 2005 - 02:02 PM.

  • 0

#13
pandra

pandra

    Member

  • Member
  • PipPip
  • 10 posts
Perfect!

But... I'm not shure about the correctness of your .profile. Don't you get error messages?
The curious thing is this:

When you type "mount foo foobar" you are mounting the device foo on the foobar mountpoint.
If you type "mount foo" you are mounting the device foo on it's default mountpoint (setted by the system).

Now, in your .profile (as i can see) you typed "mount /shared", if i'm right, you are telling the system to mount the "/shared" device on it's default mountpoint. I don't know if SuSE 10 can handle this kind of trifles. I suggest to try the "mount /dev/hdb2 /shared" syntax and see what happen.



Anyway, if it works, it's good. Ejoy your FAT32 partition.

Edited by pandra, 07 November 2005 - 05:52 PM.

  • 0

#14
Pi rules

Pi rules

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 634 posts
I tried that, and it unmounted the partition, but didn't mount it. It works somehow, though. I didn't get any error messages so far, either.

Thanks! :tazz:

Edit: I just got a security update and it stopped working again, although it wasn't much of a surprise, because I don't know how that old method worked.

So, I experimented around a little and changed the /etc/fstab file to:
/dev/hdb2			/shared			  vfat	   users,rw,exec,noauto,dev		0 0
(noauto so I wouldn't have to unmount in the .profile, because it didn't seem to work for some reason)
I then changed the .profile to:
mount -rw /dev/hdb2 /shared
(took out the umount and added the -rw and /dev/hdb2)

I'll wait and see if this works, but if it doesn't, I'll keep trying different things.

Thanks! :)

Edited by Pi rules, 08 November 2005 - 05:16 PM.

  • 0

#15
Jo Franklin

Jo Franklin

    Member

  • Member
  • PipPip
  • 26 posts
su
chmod 755

I think.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP