1

I have a interntal fat32 partition, shared with windows. In Ubuntu I don't have write access. The fstab file looks like this: /dev/disk/by-label/SHAREDI /media/SHAREDI auto, users,nosuid,nodev,nofail,x-gvfs-show 0 0 When I open up the partition in Nautilus its owner is "root".

Any ideas? I've spent quite a lot of time reading the fstab options and can't see what's wrong.

Help me askubuntu you're my only hope.

dan
  • 11
  • 2

4 Answers4

1

This usually happens when you have shut down Windows Fast Startup on or if you have Hibernated Windows. Turn off Fast Startup from the control panel power settings in Windows and make sure that you didn't hibernate Windows. Also, I recommend formatting your shared partition as NTFS as FAT has many limitations. Ubuntu supports NTFS almost perfectly.

VidathD
  • 2,704
1

The underlying problem is you used Disks to create the fstab declaration.

When you do that it mounts with the defaults for FAT32 and unlike NTFS it mounts with owner = root and permissions of 755 or 775 depending on which version of Ubuntu you are using. Writeable to root and read only to all other users.

If you want to have it mount with you as owner you need to tell the system that by adding uid=your-user-name to the list of options. For example:

/dev/disk/by-label/SHAREDI /media/SHAREDI auto users,nosuid,nodev,nofail,x-gvfs-show,uid=morbius 0 0

Now you will have write access to the partition.

PLEASE NOTE: You have a typo in your original fstab declaration. There should be no comma (,) after auto. I'm assuming that was a typo on your part. If Disks did that stop using it.

Morbius1
  • 7,761
  • Yes, thanks for the spot. That was my mistake!

    uid was a great clue. In the end I used this post https://askubuntu.com/questions/1040989/cannot-write-to-ntfs-data-partition-possibly-because-of-lack-of-permissions and my code in my fstab is now 'LABEL=SHAREDI /mnt/dbets/SHAREDI auto defaults,x-gvfs-show,umask=7000,uid=1000,gid=1000 0 0

    – dan Jun 03 '20 at 19:42
0

Make sure that fast startup in the Windows control panel is disabled. If it is, shut down Windows. After booting to Ubuntu, try to mount the partition. If you still can't mount it, try to do it using the command line so you can see what's happening. Find out the partition identifier and use this:

mkdir /media/win
mount /dev/sdXY /media/win

(replace X and Y with the identifier)

If you see something like this:

Please shut down Windows fully (no fast restart or hibernation).

then it means you need to shut down Windows without fast startup. If you still can't mount the partition even after shutting down fully, without fast startup, then you'll need to use NTFS since it has better support than FAT32 and there are some tools that will help you.

If you have NTFS:

sudo ntfsfix /dev/sdXY

Again, replace X and Y with the identifier. NOTE: Backup your data in the NTFS partition before doing that. Also, you should create a restore point if Windows fails to boot. Use this method only if you have disabled fast startup and shut down Windows fully.

This method worked for me without data loss, but you should always backup your data.

How to convert FAT32 to NTFS:

Boot Windows and open CMD. Use this command to convert a FAT32 filesystem to NTFS:

CONVERT X: /fs:ntfs

Replace X with the drive letter you want to convert. It should work for C drive (if you're on XP).

Make sure to backup your data before you execute this command. It should work without data loss, but it's always good to be prepared.

adazem009
  • 1,032
0

Here's the final answer:

I followed the instructions in this post Cannot write to NTFS data partition possibly because of lack of permissions?

I had to specify the user id and the group id when mounting. The final edit on my fstab is now: LABEL=SHAREDI /mnt/dbets/SHAREDI auto defaults,x-gvfs-show,umask=7000,uid=1000,gid=1000 0 0

It didn't seem to work without the "umask" even though there is only one user on this computer.

The partition now mounts fine and all my shortcuts work. Cheers for all the useful support.

dan
  • 11
  • 2