LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-09-2021, 03:13 PM   #1
brjoon1021
Member
 
Registered: Dec 2003
Posts: 173

Rep: Reputation: 16
Read only USB Hell: USB sticks now mounting as read only for some reason. Nemo. Need help please


I use usb sticks for work ALL DAY and i need to be able to access, delete, cut and paste anything and everything on them.

I use Peppermint Linux which I believe ultimately means Nemo in our context.
I did not make an intentional change but may have made and accidental one somehow ?

Is there a fix for this ? I have information on a USB stick right now that need to move onto my cocmputer cut and paste will not even work as those options are greyed out in the right click menu.

Last edited by brjoon1021; 02-09-2021 at 03:14 PM.
 
Old 02-09-2021, 03:49 PM   #2
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
If you run command as your user: groups
You should see all the groups your user belongs to. You should be in the usb group, and I believe the plugdev group also.
To add your user to a group, assuming your username is betty, run command below as root or sudo:
Code:
gpasswd -a betty usb
 
Old 02-09-2021, 04:19 PM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,776

Rep: Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677
will it let you drag and drop, or use the cp command as root to copy from usb? What is the filesystem on it ext4, ntfs, fat32 other? An ntfs that was umounted in hybernaition mode from a windows system will become read-only in linux.
See if a fsck will fix

Worst possible scenario is usb gone bad. A heavily used usb that suddenly becomes read-only with all existing files in tact is a sign if a usb gone bad.
 
1 members found this post helpful.
Old 02-11-2021, 08:00 PM   #4
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Using either cut or paste involves writing. Copy involves reading only. Can you read the data and are only prevented from writing?

Those could be a permissions issue or it could be a failing USB device, since they usually fail in read only mode.
 
Old 02-13-2021, 04:25 PM   #5
BudiKusasi
Member
 
Registered: Apr 2017
Distribution: Artix
Posts: 345

Rep: Reputation: 15
ls -Rl
to see perm.
On a dir. e.g foo, test with

Code:
$ cd /foo
$ sudo chmod 777 .
$ cat>bar <<<'baz'
 
Old 05-07-2022, 01:18 PM   #6
wladicus
LQ Newbie
 
Registered: Jan 2014
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by computersavvy View Post
Using either cut or paste involves writing. Copy involves reading only. Can you read the data and are only prevented from writing?

Those could be a permissions issue or it could be a failing USB device, since they usually fail in read only mode.
--------------------------------------------------------------------------------------------------
I have same issue: From what I have gathered it is not a failing USB device. I originally started out with a new USB stick and read/write functions were working on it. Then:
1. In Linux cannot write/paste files. Sometimes can write/paste in certain folders and not in others.
2. In Windows 10 the same USB stick displays no problem. Can read/write/delete/copy - without any problems.

From this particular experience it appears that the problem may be with Linux OS.
I have noticed over the past few years that the solution to this problem has been avoided by the experts. No one seems to know how to fix it permanently. This problem has appeared over several different Linux distros and proposed solutions sometimes work for some people but not for the vast majority. Sometimes the fix works for only a little while and then the USB stick returns to Read Only mode.
It would be nice if someone could fix this permanently. Windows 10 does not display this problem.
 
Old 05-07-2022, 04:50 PM   #7
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quote:
Originally Posted by wladicus View Post
--------------------------------------------------------------------------------------------------
I have same issue: From what I have gathered it is not a failing USB device. I originally started out with a new USB stick and read/write functions were working on it. Then:
1. In Linux cannot write/paste files. Sometimes can write/paste in certain folders and not in others.
2. In Windows 10 the same USB stick displays no problem. Can read/write/delete/copy - without any problems.

From this particular experience it appears that the problem may be with Linux OS.
I have noticed over the past few years that the solution to this problem has been avoided by the experts. No one seems to know how to fix it permanently. This problem has appeared over several different Linux distros and proposed solutions sometimes work for some people but not for the vast majority. Sometimes the fix works for only a little while and then the USB stick returns to Read Only mode.
It would be nice if someone could fix this permanently. Windows 10 does not display this problem.
To me this looks like a permissions issue.
Where it the device mounted? /run/media/USER/xxxx or /media/USER/xxxx?

Regardless of where it is actually mounted please do
Code:
ls -ld /path/to/device
and show us the result. If it is owned by root then the problem is easy to fix. If it is owned by your user then that can be fixed as well as soon as we know the actual ownership and permissions.
 
Old 05-07-2022, 05:05 PM   #8
wladicus
LQ Newbie
 
Registered: Jan 2014
Posts: 13

Rep: Reputation: Disabled
Result:
wladicus:~/Desktop > ls -ld /media/wladicus/8GB-11
drwxr-xr-x 23 wladicus wladicus 4096 Dec 31 1969 /media/wladicus/8GB-11

The USB device name is actually 8GB-1 but this folder is empty. No such problems in Windows.
 
Old 05-07-2022, 05:30 PM   #9
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Ok, show us the output of 'ls -ld /media/wladicus/*' and 'mount'. Please use the code tags (see instructions in my sig).
 
Old 05-07-2022, 06:46 PM   #10
Arnulf
Member
 
Registered: Jan 2022
Location: Hanover, Germany
Distribution: Slackware
Posts: 306

Rep: Reputation: 111Reputation: 111
Quote:
Originally Posted by wladicus View Post
Result:
wladicus:~/Desktop > ls -ld /media/wladicus/8GB-11
drwxr-xr-x 23 wladicus wladicus 4096 Dec 31 1969 /media/wladicus/8GB-11

drwxr-xr-x seems to be the problem.
drwxrwxrwx is required for rw access.
 
Old 05-07-2022, 11:18 PM   #11
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quote:
Originally Posted by Arnulf View Post
drwxr-xr-x seems to be the problem.
drwxrwxrwx is required for rw access.
NO it is not. That allows anyone to write in that location and is not according to the standard permissions for almost every linux system in the world.

The permissions posted by the OP are correct IF the user name is correct.
 
Old 05-08-2022, 05:37 AM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,233

Rep: Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671
From the information in your posts, I would guess the most likely scenarios is that a windows update turned hibernation back on. This would seem the most likely if it was working on both Linux and windows originally. Some, not all updates on windows turn hibernation back on if it was off but never informs the user. The first thing I would do is check hibernation under power setting on windows.
 
Old 05-08-2022, 09:17 AM   #13
wladicus
LQ Newbie
 
Registered: Jan 2014
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by computersavvy View Post
Ok, show us the output of 'ls -ld /media/wladicus/*' and 'mount'. Please use the code tags (see instructions in my sig).

wladicus:~/Desktop > ls -ld /media/wladicus/*
Code:
drwx------  2 root     root      4096 Jun 14  2021  /media/wladicus/1293EB7A1A1D11D0
drwx------  2 root     root      4096 Aug  2  2021  /media/wladicus/1293EB7A1A1D11D01
drwx------  2 root     root      4096 Aug  9  2021  /media/wladicus/1293EB7A1A1D11D02
drwx------  2 root     root      4096 Apr 26 13:32  /media/wladicus/8GB-1
drwxr-xr-x 23 wladicus wladicus  4096 Dec 31  1969  /media/wladicus/8GB-11
drwxrwxrwx  1 wladicus wladicus  8192 Apr 23 11:04  /media/wladicus/LACIE-A
drwx------  2 root     root      4096 Jun 13  2021  /media/wladicus/LACIE-B
drwx------  2 root     root      4096 Jun 16  2021  /media/wladicus/LACIE-B1
drwx------  2 root     root      4096 Jun 26  2021  /media/wladicus/LACIE-B2
drwx------  2 root     root      4096 Aug 24  2021  /media/wladicus/LACIE-B3
drwx------  2 root     root      4096 Aug 31  2021  /media/wladicus/LACIE-B4
drwx------  2 root     root      4096 Sep  1  2021  /media/wladicus/LACIE-B5
drwx------  2 root     root      4096 May  4 07:57  /media/wladicus/LACIE-B6
drwxr-xr-x 19 wladicus wladicus 32768 Dec 31  1969  /media/wladicus/LACIE-B7
drwx------  2 root     root      4096 Jul 18  2021  /media/wladicus/LACIE-C
drwx------  2 root     root      4096 Aug 24  2021  /media/wladicus/LACIE-C1
drwx------  2 root     root      4096 Dec 21 08:17  /media/wladicus/LACIE-C2
drwx------  2 root     root      4096 Apr 13 09:50  /media/wladicus/LACIE-C3
drwxr-xr-x 19 wladicus wladicus 16384 Dec 31  1969  /media/wladicus/LACIE-C4
drwx------  2 root     root      4096 Jun 18  2021  /media/wladicus/LACIE-D
drwx------  2 root     root      4096 Jun 26  2021  /media/wladicus/LACIE-D1
drwx------  2 root     root      4096 Jun 26  2021  /media/wladicus/LACIE-D2
drwx------  2 root     root      4096 Jul 14  2021  /media/wladicus/LACIE-D3
drwx------  2 root     root      4096 Jul 18  2021  /media/wladicus/LACIE-D4
drwx------  2 root     root      4096 Oct 14  2021  /media/wladicus/LACIE-D5
drwxr-xr-x  8 wladicus wladicus 16384 Dec 31  1969  /media/wladicus/LACIE-D6
drwxrwxrwx  2 root     root      4096 Sep 20  2021 '/media/wladicus/MY STORAGE PARTITION'
drwx------  2 root     root      4096 Sep 20  2021 '/media/wladicus/WINDOWS 10'
wladicus:~/Desktop >
------------------------------------------------------------------------------
wladicus:~/Desktop > mount
Code:
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,noexec,relatime,size=3970240k,nr_inodes=992560,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=801092k,mode=755,inode64)
/dev/sda5 on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755,inode64)
cgroup2 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)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
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/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/misc type cgroup (rw,nosuid,nodev,noexec,relatime,misc)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=16277)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
/var/lib/snapd/snaps/bare_5.snap on /snap/bare/5 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_12941.snap on /snap/core/12941 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_2284.snap on /snap/core18/2284 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_12834.snap on /snap/core/12834 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gimp_386.snap on /snap/gimp/386 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-26-1604_102.snap on /snap/gnome-3-26-1604/102 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-26-1604_104.snap on /snap/gnome-3-26-1604/104 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gimp_389.snap on /snap/gimp/389 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-28-1804_161.snap on /snap/gnome-3-28-1804/161 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-38-2004_87.snap on /snap/gnome-3-38-2004/87 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-28-1804_145.snap on /snap/gnome-3-28-1804/145 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-34-1804_77.snap on /snap/gnome-3-34-1804/77 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_2344.snap on /snap/core18/2344 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1519.snap on /snap/gtk-common-themes/1519 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/snap-store_558.snap on /snap/snap-store/558 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/snapd_15177.snap on /snap/snapd/15177 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-34-1804_72.snap on /snap/gnome-3-34-1804/72 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/snapd_15534.snap on /snap/snapd/15534 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1515.snap on /snap/gtk-common-themes/1515 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/snap-store_554.snap on /snap/snap-store/554 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-38-2004_99.snap on /snap/gnome-3-38-2004/99 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk2-common-themes_13.snap on /snap/gtk2-common-themes/13 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core20_1405.snap on /snap/core20/1405 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/zoom-client_175.snap on /snap/zoom-client/175 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core20_1434.snap on /snap/core20/1434 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/zenity_18.snap on /snap/zenity/18 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/zoom-client_170.snap on /snap/zoom-client/170 type squashfs (ro,nodev,relatime,x-gdu.hide)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=801088k,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sdb on /media/wladicus/8GB-11 type vfat (rw,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)
tmpfs on /run/snapd/ns type tmpfs (rw,nosuid,nodev,noexec,relatime,size=801092k,mode=755,inode64)
nsfs on /run/snapd/ns/snap-store.mnt type nsfs (rw)
/dev/sdc3 on /media/wladicus/LACIE-C4 type vfat (rw,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/sdc2 on /media/wladicus/LACIE-B7 type vfat (rw,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/sdc4 on /media/wladicus/LACIE-D6 type vfat (rw,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/sdc1 on /media/wladicus/LACIE-A type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
wladicus:~/Desktop >

Last edited by wladicus; 05-08-2022 at 09:21 AM.
 
Old 05-09-2022, 10:57 AM   #14
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quote:
Originally Posted by wladicus View Post
wladicus:~/Desktop > ls -ld /media/wladicus/*
Code:
drwx------  2 root     root      4096 Jun 14  2021  /media/wladicus/1293EB7A1A1D11D0
drwx------  2 root     root      4096 Aug  2  2021  /media/wladicus/1293EB7A1A1D11D01
drwx------  2 root     root      4096 Aug  9  2021  /media/wladicus/1293EB7A1A1D11D02
drwx------  2 root     root      4096 Apr 26 13:32  /media/wladicus/8GB-1
drwxr-xr-x 23 wladicus wladicus  4096 Dec 31  1969  /media/wladicus/8GB-11
drwxrwxrwx  1 wladicus wladicus  8192 Apr 23 11:04  /media/wladicus/LACIE-A
drwx------  2 root     root      4096 Jun 13  2021  /media/wladicus/LACIE-B
drwx------  2 root     root      4096 Jun 16  2021  /media/wladicus/LACIE-B1
drwx------  2 root     root      4096 Jun 26  2021  /media/wladicus/LACIE-B2
drwx------  2 root     root      4096 Aug 24  2021  /media/wladicus/LACIE-B3
drwx------  2 root     root      4096 Aug 31  2021  /media/wladicus/LACIE-B4
drwx------  2 root     root      4096 Sep  1  2021  /media/wladicus/LACIE-B5
drwx------  2 root     root      4096 May  4 07:57  /media/wladicus/LACIE-B6
drwxr-xr-x 19 wladicus wladicus 32768 Dec 31  1969  /media/wladicus/LACIE-B7
drwx------  2 root     root      4096 Jul 18  2021  /media/wladicus/LACIE-C
drwx------  2 root     root      4096 Aug 24  2021  /media/wladicus/LACIE-C1
drwx------  2 root     root      4096 Dec 21 08:17  /media/wladicus/LACIE-C2
drwx------  2 root     root      4096 Apr 13 09:50  /media/wladicus/LACIE-C3
drwxr-xr-x 19 wladicus wladicus 16384 Dec 31  1969  /media/wladicus/LACIE-C4
drwx------  2 root     root      4096 Jun 18  2021  /media/wladicus/LACIE-D
drwx------  2 root     root      4096 Jun 26  2021  /media/wladicus/LACIE-D1
drwx------  2 root     root      4096 Jun 26  2021  /media/wladicus/LACIE-D2
drwx------  2 root     root      4096 Jul 14  2021  /media/wladicus/LACIE-D3
drwx------  2 root     root      4096 Jul 18  2021  /media/wladicus/LACIE-D4
drwx------  2 root     root      4096 Oct 14  2021  /media/wladicus/LACIE-D5
drwxr-xr-x  8 wladicus wladicus 16384 Dec 31  1969  /media/wladicus/LACIE-D6
drwxrwxrwx  2 root     root      4096 Sep 20  2021 '/media/wladicus/MY STORAGE PARTITION'
drwx------  2 root     root      4096 Sep 20  2021 '/media/wladicus/WINDOWS 10'
As you can see there are many different directories under /media/wladicus. Most are owned by root and are only accessible by root.

Are these actually used directories? or are they leftover from improperly removing the USB devices?

If they are leftover then they should be cleaned up and removed. If you dismount and remove all the usb devices currently attached (I see /dev/sdb and /dev/sdc1-4 as mounted devices) then you can clean up the clutter with "sudo rm -r /media/wladicus/*" to remove all the unused directories there.

Then you can reattach the usb device of interest (/dev/sdb) and once again look at "ls -l /media/wladicus" to see the ownership and permissions given when it mounts. If it mounts with ownership wladicus and permissions rwxr-xr-x then that is what it should be and you should have it accessible. If instead it mounts with ownership root then we need to make one change to fix that.


Quote:
wladicus:~/Desktop > mount
Code:
/dev/sdb on /media/wladicus/8GB-11 type vfat (rw,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/sdc3 on /media/wladicus/LACIE-C4 type vfat (rw,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/sdc2 on /media/wladicus/LACIE-B7 type vfat (rw,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/sdc4 on /media/wladicus/LACIE-D6 type vfat (rw,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/sdc1 on /media/wladicus/LACIE-A type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
wladicus:~/Desktop >
While I don't know if you are mounting these devices through /etc/fstab or allowing them to auto-mount, I personally would use an entry in /etc/fstab since it appears you have them in specific locations.

The way to ensure they always mount in the same location and always have the proper permissions is to do the following.
Code:
1.  create a mount point for each one you intend to mount at a fixed point.
This could be (using the mount points above) something like /media/wladicus/LACIE-A, /media/wladicus/LACIE-B, etc.

2.  create an entry in /etc/fstab to mount the desired device at that mount point. 
(Here I assume you have labeled file systems on the device /dev/sdc, and that sdc2 is labeled LACIE-B, etc.) 
The entry could read 
"LABEL=LACIE-B /media/wladicus/LACIE-B  vfat rw,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  0 2"
Obviously you would want to modify the options to fit your needs, 
and possibly add 'nofail' so it does not block a boot when the device 
is not attached.

3.  Make certain the entry works properly by doing "mount -a" and 
verifying the device mounted as expected

4.  Once mounted then "ls -l /media/wladicus" would show ownership and permissions.  
If it does not show 
"drwxr-xr-x 19 wladicus wladicus 32768 Dec 31  1969  /media/wladicus/LACIE-B"
(or equivalent) then you would need to use chown to change the ownership at
the mount point to the user 
"chown -R wladicus:wladicus /media/wladicus/LACIE-B" and 
chmod to change the permissions ("chmod 755 /media/wladicus/LACIE-B")
Once all that has been done then the file system should always mount properly with the proper owner and permissions.

Repeat the above for each file system you routinely mount and the permissions and mounting should be solved for you.

Last edited by computersavvy; 05-09-2022 at 11:02 AM.
 
Old 05-09-2022, 02:04 PM   #15
wladicus
LQ Newbie
 
Registered: Jan 2014
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by computersavvy View Post
As you can see there are many different directories under /media/wladicus. Most are owned by root and are only accessible by root. ...

Are these actually used directories? or are they leftover from improperly removing the USB devices?

If they are leftover then they should be cleaned up and removed. If you dismount and remove all the usb devices currently attached (I see /dev/sdb and /dev/sdc1-4 as mounted devices) then you can clean up the clutter with "sudo rm -r /media/wladicus/*" to remove all the unused directories there.

Then you can reattach the usb device of interest (/dev/sdb) and once again look at "ls -l /media/wladicus" to see the ownership and permissions given when it mounts. If it mounts with ownership wladicus and permissions rwxr-xr-x then that is what it should be and you should have it accessible. If instead it mounts with ownership root then we need to make one change to fix that.

While I don't know if you are mounting these devices through /etc/fstab or allowing them to auto-mount, I personally would use an entry in /etc/fstab since it appears you have them in specific locations.

The way to ensure they always mount in the same location and always have the proper permissions is to do the following.
Code:
1.  create a mount point for each one you intend to mount at a fixed point.
This could be (using the mount points above) something like /media/wladicus/LACIE-A, /media/wladicus/LACIE-B, etc.

2.  create an entry in /etc/fstab to mount the desired device at that mount point. 
(Here I assume you have labeled file systems on the device /dev/sdc, and that sdc2 is labeled LACIE-B, etc.) 
The entry could read 
"LABEL=LACIE-B /media/wladicus/LACIE-B  vfat rw,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  0 2"
Obviously you would want to modify the options to fit your needs, 
and possibly add 'nofail' so it does not block a boot when the device 
is not attached.

3.  Make certain the entry works properly by doing "mount -a" and 
verifying the device mounted as expected

4.  Once mounted then "ls -l /media/wladicus" would show ownership and permissions.  
If it does not show 
"drwxr-xr-x 19 wladicus wladicus 32768 Dec 31  1969  /media/wladicus/LACIE-B"
(or equivalent) then you would need to use chown to change the ownership at
the mount point to the user 
"chown -R wladicus:wladicus /media/wladicus/LACIE-B" and 
chmod to change the permissions ("chmod 755 /media/wladicus/LACIE-B")
Once all that has been done then the file system should always mount properly with the proper owner and permissions.

Repeat the above for each file system you routinely mount and the permissions and mounting should be solved for you.
Thank you for your detailed analysis. The directories owned by root have nothing in them. Ubuntu 20.04 appears to be creating these directories on various boots (who knows why). My original devices are then renamed (e.g. 8GB-1 was renamed 8GB-11). The 8GB-1 is now owned by root but has nothing in it; the 8GB-11 is owned by wladicus but it still denies write access even though the listing shows write access:
Code:
drwxr-xr-x 23   wladicus wladicus  4096 Dec 31  1969  /media/wladicus/8GB-11
My question is - Why does Linux create these problems which force the user to make corrections?
-------------------
As noted before, I do not encounter any of these problems in Windows 10. Thank you for all your instructions. I would rather just use a properly working operating system. Anyhow my art is not in OS function repair.
I hope that somebody eventually fixes this particular problem so that Linux works properly. Everybody seems to be keen on releasing the next "improved version" but some existing problems appear to be overlooked, as this particular case for example. It should be easier than programming rovers on Mars.

I know there are 'shmucks' like me who complain, but we only want to use a system that works where it is expected to work without having to take a course in how to fix problems.

Thank you again - your input is appreciated. - walt
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Desktop RAM sticks I bought are only about half as tall as the RAM sticks they're replacing Gregg Bell Linux - Newbie 7 06-07-2016 06:16 AM
[SOLVED] USB sticks don't work afe r being used as I.S.O boot sticks grahama Linux - Newbie 20 06-23-2015 06:23 PM
[SOLVED] "read-only filesystem" error on USB sticks = bad sticks? newbiesforever Linux - General 4 09-26-2013 05:33 PM
can't read/write to USB sticks--"read-only filesystem" newbiesforever Linux - General 2 08-13-2013 05:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration