Hi,
i mount my windows partition with this command :sudo mount -t ntfs3 /dev/sdb2 /mnt
the problem is that it’s in read-only mode. What happens ?
Hi,
i mount my windows partition with this command :sudo mount -t ntfs3 /dev/sdb2 /mnt
the problem is that it’s in read-only mode. What happens ?
I recall that if the NTFS partition was not dismounted cleanly from Windows that it will be set readonly.
Boot back into Windows and make sure that fast boot is turned off as it will prevent the NTFS partition being dismounted.
See if that helps.
Correct: if windows is set for fast start the ntfs file system will always be mounted RO.
Windows must have fast start disabled before fedora can properly access an ntfs file system.
It’s not this, i also have a KDE Neon system on the computer and it can access the windows partition correctly.
When you mount thr ntfs system have a look at sudo dmesg
and see if there are kernel messages about the mount.
these are the messages :
ntfs3: Enabled Linux POSIX ACLs support
ntfs3: Read-only LZX/Xpress compression included
What happens if you are for explicit read-write access?
sudo mount -t ntfs3 -o rw /dev/sdb2 /mnt
Do you have anything in /etc/fstab for this mount point?
same result with explicit read-write access.
nothing in /etc/fstab
How do you know it is read-only?
i can’t edit anything
That likely a permissions issue not a read-only mount issue.
First check who owns the file you are trying to edit with ls -l
does it show the file is owned by root?
To fix this I think this is all you need to do following:
sudo chown $USER:$USER /mnt
sudo mount -t ntfs3 -o rw /dev/sdb2 /mnt
Check the file ownership again, I think you will see you are the owner.
Now I suspect you can edit the files.
I should explain. When a file system’s permissions and ownership cannot be understood by linux it uses the permissions and ownership of the mount point.
Or more precisely: The uid= mount option in the mount command. From man mount
Mount options for ntfs
...
uid=value, gid=value and umask=value
Set the file permission on the filesystem. The umask value is given in octal.
By default, the files are owned by root and not readable by somebody else.
It is indeed a permission issue (i can see in the folder properties that it’s owned by root). But the commandes that you indicated doesn’t solve the issue.
I don’t understand what you mean i should do with the mount command.
I think it would something like this:
sudo mount -t ntfs3 -o uid=$(id -u),gid=$(id -g) /dev/sdb2 /mnt
However you might want to add this to your /etc/fstab so that the mount point and options are all recorded. Then you can either alwatys mount when you boot or on demand with a sudo mount ...
command.
It works fine with this last command, thank you.
What would be the correct syntax in /etc/fstab please ?
You should look at the fstab man page and ask about the specific sections you don’t understand. My students and new colleagues with no previous linux experience have found https://linuxcommand.org useful.
Add this line to /etc/fstab and test you can mount and umount BEFORE you reboot.
If you get errors then delete the line.
I suggest you create a new mount directory say /windows.
/dev/sdb2 /windows ntfs3 defaults,uid=<U>,gid=<G>,noauto,user 0 0
Replace and with you uid and gid.
You can find out your uid with uid -u
and your gid with uid -g
.
The noauto
mean the drive is not mount when the system boot up.
The user
mean you can mount the driver as a user and should not need to use sudo.
Test that the line you add works BEFORE rebooting.
You should be able do mount /windows
and get access to the files.
Then you should be able to do umount /windows
.
If you can mount and umount try a reboot.
Wouldn’t it be better to create the directory (mount point) in the users home directory then have that line read
/dev/sdb2 /home/USER/windows ntfs3 defaults,uid=<U>,gid=<G>,noauto,user 0 0
where USER is replaced with the user name.
As you phrased it a directory /windows would need to be created in the root (system) file system and the file manager would need to be directed to that path.