Give me a quick answer if possible.. why is the encrypted storage read-only on some linux machines?

I need to backup stuff sometimes on encrypted storage but when i try and create a folder it says read-only. how do i fix this quick?? It works on some of my machines… not others.
It is sometimes read only sometimes not. why??? How do i fix it?

You can check if you are the owner of the directory and see if you have the rights to write with ls -l.
If you are not the owner chown is the right command to change it, if you are the owner but you are missing the permission to write chmod is the command you need to use (I assume you are using Linux). Check out the documentations for these commands in the ubuntu wiki to find out the right syntax.
However this does not answer why you experiance that behaviour, it might only help you to fix it.

Thank you. Yes, but it’s wierd i even got it in the first place. So what linux command would i use in the root encrypted folder to give every folder the right permission then?
Right now the root folders have:

But i can’t copy or create a folder… Why is that? How do i change it? I have not changed anything… I think the nitrokey did this on it’s own and i don’t want to destroy the permissions…

When i try to change a folder with:
sudo chmod 777 folder
I get:
chmod: changing permissions of ‘folder/’: Read-only file system

So again. Can you guide me more? I did read some about permissions… What do if i can’t change permissions with sudo su or sudo command?
This is very wierd! If i check about nitrokey it says: encrypted READ/WRITE.
I still can’t even create a folder or copy there… So what do i do exactly? Why do i have this issue? Thank you

Can someone reply to how you should chmod if you don’t have the permissions?

For some reason, the filesystem is mounted readonly. Unfortunately, I have no idea what encrypted storage are you using and how - so I can’t help.

Hey. It’s a nitrokey storage device. Can you help me? I’m asking on this forum because i have the nitrokey storage device, and the encrypted part is read only all of a sudden… why? How do i fix it??
If i don’t have write permissions even…

ok what does the mount command say? If you know which entry is for the nitrokey storage, then list this one - if not feel free to post all of them.

Hi. Better to answer late then never. :wink:
/dev/sdc1 on /media//Nitrokey type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
/dev/sdd1 on /media/
/encrypted type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

It’s the encrypted that has issues. What do i do? I might have messed up something with gparted, not sure… Not sure how i ended up like this. I can copy files, but not create folders and stuff at the moment.
Thanks for the support!

Both /media/Nitrokey and /media/encrypted are mounted read-only. I don’t know how those filesystems got mounted or unmounted (I don’t have the device and I don’t work for Nitrokey), but the steps I’d do are:

Unmount both unencrypted and encrypted volumes

The commands to do that might be something like:

umount /media/encrypted
umount /media/Nitrokey

Check both disks for errors:

fsck.fat /dev/sdc1
fsck.fat /dev/sdd1

After that mount them again (as when the device is inserted) and see.

Instead of “(ro,nosuid,...” one should have “(rw,nosuid,...

Use at your risk, I do not take any responsibility for any lost data.

A late reply… I needed to use the nitrokey, and you are the greatest. :wink: It worked brilliantly!

I edited some but i choose this and it worked! :slight_smile:

fsck.fat /dev/sdc1
fsck.fat 4.2 (2021-01-31)
open: Read-only file system
root@*:/home/***# fsck.fat /dev/sdd1
fsck.fat 4.2 (2021-01-31)
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
1) Copy original to backup
2) Copy backup to original
3) No action
[123?q]? 1
  File size is 301232128 bytes, cluster chain length is > 301236224 bytes.
  Truncating file to 301232128 bytes.
 Start does point to root directory. Deleting dir. 
Reclaimed 8 unused clusters (65536 bytes).
Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
[12?q]? 1
Free cluster summary wrong (1357957 vs. really 1358216)
1) Correct
2) Don't correct
[12?q]? 1

*** Filesystem was changed ***
The changes have not yet been written, you can still choose to leave the
filesystem unmodified:
1) Write changes
2) Leave filesystem unchanged
[12?q]? 1

So thank you very much! That might help someone else with the same issue also. I can now create folders and it seems to work normally like it should. :wink:


Great it worked! You can try to mark your last post as a “solution”.