Score:0

Can't write files in a partition

vn flag

I've just installed Ubuntu latest one today (21.04). I don't have any other OS on my laptop, only Ubuntu. I want to edit a text file stored in Part4, which is in NTFS filesystem. But when I edited it I saw that I can't save that as it's showing that the file is in read only. Also I can't delete files from the partition as they return the same issue. What should I do?

Note that I am completely new in Ubuntu, in fact I had windows 10 installed on my laptop till last night when I decided to try something new.

guiverc avatar
cn flag
If your NTFS partition isn't clean (ie. used by a hibernated/fastboot-enabled system), the mount can only be RO so as to prevent data loss. You've not said how you mounted (I'll assume RW) as a *fs* (file-system) flipping to RO is a sign of a problem being detected & the RO prevents data-loss. Look at how mounted, or when it *flipped* to RO if it was mounted RW.
Kingshuk Chakravorty avatar
vn flag
Would you please tell me how to check that-- the mounting system??
guiverc avatar
cn flag
I can't know how you mounted it, if you used the `mount` command it'll be by that command, if you used a GUI tool the message may only be found in logs (or an indicator on the screen/gui). The command `dmesg` will show most logs since boot; though if you know when you mounted it; you can search `journalctl` which for messages around the time/date of your mount. One benefit of commands, is the messages appear both in logs (if needed later) & appear on screen after your command; if you're using a GUI they are in logs only often (you didn't say if 21.04 desktop, or 21.04 server..)
24601 avatar
in flag
You may need to consider [convert NTFS > EXT4](https://askubuntu.com/questions/63022/convert-filesystem-ntfs-ext4) but backup everything important!
Kingshuk Chakravorty avatar
vn flag
@guiverc its desktop version I went to Disk and found that its showing for the partition: NTFS-- mounted at /media/usename/Part4
Kingshuk Chakravorty avatar
vn flag
@24601 that'll be a huge problem, as I have 96 gb free out of 251 gb in that partition...
Kingshuk Chakravorty avatar
vn flag
Oh another thing, I tried chmod command and it just says that changing permission: read-only I used this: chmod a+rwx /media/username/Part4 -R
Kingshuk Chakravorty avatar
vn flag
Finally I got a solution!!! I used ntfsfix command it went so smoothly!! Yayy!! Thanks to both of you for helping me! :D
ChanganAuto avatar
us flag
You're now strongly advised - again- to use EXT4 instead of NTFS. There WILL come a time when you find errors that can't be corrected with Linux tools (NTFS is a Microsoft proprietary file system) and that will be a problem because you no longer have Windows. Please proceeed accordingly ASAP, for your own good.
Kingshuk Chakravorty avatar
vn flag
@ChanganAuto ok I'll try to do so... Thanks :D
Kingshuk Chakravorty avatar
vn flag
I've successfully changed the filesystem to ext4 for all of my partitions. The shrink-&-go method was really helpful. Thanks people! :D
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.