I can't change permisions to an external memory

Asked by Oscar Otero

I was reading many you tube video, but they don't work with me. I've an external memory who is read only, but I want to write on it. So I open it in one terminal They show me many directories and files, so I make: chmod 777 * to change its permissions, and the terminal said: osher@osher-Lenovo-B50-70:/media/osher/FCF8-46B5$ ls -l
total 15680
drwxr-xr-x 5 osher osher 32768 ene 13 2019 apps
-rw-r--r-- 1 osher osher 2153056 dic 8 2012 boot.elf
drwxr-xr-x 2 osher osher 32768 ene 12 2019 extra
drwxr-xr-x 6 osher osher 32768 ene 12 2019 IOS
-rw-r--r-- 1 osher osher 1922960 ago 29 2013 IOS37-64-v5662.wad
-rw-r--r-- 1 osher osher 1939280 ago 29 2013 IOS38-64-v4123.wad
-rw-r--r-- 1 osher osher 1922960 ago 29 2013 IOS53-64-v5662.wad
-rw-r--r-- 1 osher osher 1922960 ago 29 2013 IOS55-64-v5662.wad
-rw-r--r-- 1 osher osher 1940064 ago 29 2013 IOS56-64-v5661.wad
-rw-r--r-- 1 osher osher 1967712 ago 29 2013 IOS57-64-v5918.wad
-rw-r--r-- 1 osher osher 1991584 ago 29 2013 IOS58-64-v6175.wad
drwxr-xr-x 3 osher osher 32768 sep 30 17:45 private
drwxr-xr-x 2 osher osher 32768 sep 30 17:54 'System Volume Information'
osher@osher-Lenovo-B50-70:/media/osher/FCF8-46B5$ chmod 777 *
chmod: cambiando los permisos de 'apps': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'boot.elf': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'extra': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'IOS': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'IOS37-64-v5662.wad': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'IOS38-64-v4123.wad': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'IOS53-64-v5662.wad': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'IOS55-64-v5662.wad': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'IOS56-64-v5661.wad': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'IOS57-64-v5918.wad': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'IOS58-64-v6175.wad': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'private': Sistema de archivos de solo lectura
chmod: cambiando los permisos de 'System Volume Information': Sistema de archivos de solo lectura
osher@osher-Lenovo-B50-70:/media/osher/FCF8-46B5$
But, unfortunately then, they show this: osher@osher-Lenovo-B50-70:/media/osher/FCF8-46B5$ ls -l
total 15680
drwxr-xr-x 5 osher osher 32768 ene 13 2019 apps
-rw-r--r-- 1 osher osher 2153056 dic 8 2012 boot.elf
drwxr-xr-x 2 osher osher 32768 ene 12 2019 extra
drwxr-xr-x 6 osher osher 32768 ene 12 2019 IOS
-rw-r--r-- 1 osher osher 1922960 ago 29 2013 IOS37-64-v5662.wad
-rw-r--r-- 1 osher osher 1939280 ago 29 2013 IOS38-64-v4123.wad
-rw-r--r-- 1 osher osher 1922960 ago 29 2013 IOS53-64-v5662.wad
-rw-r--r-- 1 osher osher 1922960 ago 29 2013 IOS55-64-v5662.wad
-rw-r--r-- 1 osher osher 1940064 ago 29 2013 IOS56-64-v5661.wad
-rw-r--r-- 1 osher osher 1967712 ago 29 2013 IOS57-64-v5918.wad
-rw-r--r-- 1 osher osher 1991584 ago 29 2013 IOS58-64-v6175.wad
drwxr-xr-x 3 osher osher 32768 sep 30 17:45 private
drwxr-xr-x 2 osher osher 32768 sep 30 17:54 'System Volume Information'
osher@osher-Lenovo-B50-70:/media/osher/FCF8-46B5$
So, nothing has changed. I need some help please.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Oscar Otero
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

mount; lsb_release -a; uname -a

Thanks

Throwing 777 around is a really bad practice.

Revision history for this message
Oscar Otero (osher0618) said :
#2

osher@osher-Lenovo-B50-70:~$ mount; lsb_release -a; uname -a
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=4054728k,nr_inodes=175266,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=815056k,mode=755)
/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12273)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/var/lib/snapd/snaps/gnome-3-28-1804_162.snap on /snap/gnome-3-28-1804/162 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-28-1804_144.snap on /snap/gnome-3-28-1804/144 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/bare_5.snap on /snap/bare/5 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/video-downloader_542.snap on /snap/video-downloader/542 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/snapd_17951.snap on /snap/snapd/17951 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/snapd_18356.snap on /snap/snapd/18356 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/video-downloader_547.snap on /snap/video-downloader/547 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1534.snap on /snap/gtk-common-themes/1534 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_2715.snap on /snap/core18/2715 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1535.snap on /snap/gtk-common-themes/1535 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_2709.snap on /snap/core18/2709 type squashfs (ro,nodev,relatime,x-gdu.hide)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /run/user/122 type tmpfs (rw,nosuid,nodev,relatime,size=815052k,mode=700,uid=122,gid=105)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=815052k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/mmcblk0p1 on /media/osher/FCF8-46B5 type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
/dev/fuse on /run/user/1000/doc type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
Linux osher-Lenovo-B50-70 4.15.0-206-generic #217-Ubuntu SMP Fri Feb 3 19:10:01 UTC 2023 i686 i686 i686 GNU/Linux
osher@osher-Lenovo-B50-70:~$

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

vfat...? Weird are you using FAT32 on the storage?

Revision history for this message
Oscar Otero (osher0618) said :
#4

Yes, the external memory is vfat. So? I was checking another external memory, that I had, and it is vfat too. Before it was working perfectly, but now it doesn't work. So both external memory can't allow me to write on they

Revision history for this message
Oscar Otero (osher0618) said :
#5

them

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

Before you physically unplug the device, do you use the safe remove feature in the OS before you physically unplug it?

You may want to use a Windows system and run a full chkdsk on the file system to make sure it is complete and consistent.

Revision history for this message
Oscar Otero (osher0618) said :
#7

Yes, before I physically unplug it I use the safe remove feature.I don't use Windows system since 2006. I believe I'm a free man, so I don't use it. Perhaps I need to find out some app to check the file system. Surely there will be one.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

There is an fsck in Linux as FAT32 is open source. Should be able to check it for you

Revision history for this message
Oscar Otero (osher0618) said :
#9

Well I did it, but it yield this:

osher@osher-Lenovo-B50-70:~$ fsck
fsck de util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
/dev/sda1 está montado.

¡¡ATENCIÓN!! El sistema de ficheros está montado. Si se continúa se PROVOCARÁN
GRAVES daños al sistema de ficheros.

¿De verdad quiere continuar?<n>? no
revisión interrumpida.
osher@osher-Lenovo-B50-70:~$
 So, I said no to continue. I'm afraid to do something wrong.

Revision history for this message
Oscar Otero (osher0618) said :
#10

I continued and did this
revisión interrumpida.
osher@osher-Lenovo-B50-70:~$ fsck /dev/mmcblk0p1
fsck de util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
fsck.ext2: Permiso denegado mientras se intentaba abrir /dev/mmcblk0p1
Se debe tener acceso r/w al sistema de archivos o ser root
osher@osher-Lenovo-B50-70:~$ ^C

Revision history for this message
Oscar Otero (osher0618) said :
#11

Perhaps being root it can work.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#12

Unmount the file system and prefix with sudo

Revision history for this message
Oscar Otero (osher0618) said :
#13

So sorry, can you tell me how I should do it?
I think it will be something like this:
osher@osher-Lenovo-B50-70:~$ sudo unmount (and now?)
Thanks in advance.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#14

sudo umount /dev/mmcblk0p1
sudo fsck /dev/mmcblk0p1

Will do it.

Revision history for this message
Oscar Otero (osher0618) said :
#15

I did it.
osher@osher-Lenovo-B50-70:~$ sudo umount /dev/mmcblk0p1
umount: /dev/mmcblk0p1: no montado.
osher@osher-Lenovo-B50-70:~$ sudo fsck /dev/mmcblk0p1
fsck de util-linux 2.31.1
fsck.fat 4.1 (2017-01-24)
open: Sistema de archivos de solo lectura
osher@osher-Lenovo-B50-70:~$

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#16

OK, safe remove the storage then pull it out and push it back in and run:

sudo mount -o remount,rw /dev/mmcblk0p1

Does that help?

Revision history for this message
Oscar Otero (osher0618) said :
#17

Unfortunately, no. I did it and they yield:

osher@osher-Lenovo-B50-70:~$ sudo mount -o remount,rw /dev/mmcblk0p1
mount: /media/osher/FCF8-46B5: no se puede volver a montar /dev/mmcblk0p1 para lectura y escritura; está protegido contra escritura.
osher@osher-Lenovo-B50-70:~$

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#18

Is there a physical switch on the device to make it write protected?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#19

If not then run:

sudo apt -y install hdparm
sudo hdparm -r0 /dev/mmcblk0p1

Then safe remove the device and then unplug, count to 5 then push it back in

Revision history for this message
Oscar Otero (osher0618) said :
#20

Well, as everything was failing, I take into consideration changing the adapter that got the MicroSD inside, I did it and voilà, it function perfectly. So thank you very much, I learn a lot with your help. I appreciate it! Summarizing it wasn't a software problem, it was a hardware one. Again, and again, thank you so much.

Revision history for this message
zxz (zsc20) said :
#21

She choose the world-renowned Palm Springs Modern Art Museum to host her first Dinah. Mariah knew an event inside this spectacular museum, surrounded by priceless artwork, was just the kind of statement she was trying to make – that our community is worth the very best and she was going to offer it.https://thedinah.com/