Page 1 of 1

Mx21 -- copy files to external hdd

Posted: Fri Jan 13, 2023 4:22 pm
by rdotex
I must be getting old! I'm only 78, but I can't copy files to my hdd anymore! Any help for this 'old fart'?

Re: Mx21 -- copy files to external hdd

Posted: Fri Jan 13, 2023 4:39 pm
by Eadwine Rose
Please provide your quick system info (the whole thing), then we can see your system, might give a clue.

Mind.. 78 is still young! ;) :smile:

Re: Mx21 -- copy files to external hdd

Posted: Fri Jan 13, 2023 4:43 pm
by rdotex
OK. I forgot it, so here it is now:

Code: Select all

System:    Kernel: 5.10.0-20-amd64 [5.10.158-2] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.0-20-amd64 
           root=UUID=<filter> ro quiet splash 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.16.1 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.2.1_x64 Wildflower October 20  2021 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Desktop System: Dell product: OptiPlex 790 v: 01 serial: <filter> Chassis: 
           type: 6 serial: <filter> 
           Mobo: Dell model: 0HY9JP v: A01 serial: <filter> BIOS: Dell v: A22 date: 07/03/2018 
CPU:       Info: Quad Core model: Intel Core i5-2400 bits: 64 type: MCP arch: Sandy Bridge 
           family: 6 model-id: 2A (42) stepping: 7 microcode: 2F cache: L2: 6 MiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 24742 
           Speed: 2916 MHz min/max: 1600/3400 MHz Core speeds (MHz): 1: 2916 2: 2963 3: 2829 
           4: 2800 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled 
           Type: mds mitigation: Clear CPU buffers; SMT disabled 
           Type: meltdown mitigation: PTI 
           Type: mmio_stale_data status: Unknown: No mitigations 
           Type: retbleed status: Not affected 
           Type: spec_store_bypass 
           mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: disabled, 
           RSB filling, PBRSB-eIBRS: Not affected 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics vendor: Dell 
           driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:0102 class-ID: 0300 
           Display: x11 server: X.Org 1.20.11 compositor: xfwm4 v: 4.16.1 driver: loaded: intel 
           display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1280x1024 s-dpi: 96 s-size: 338x270mm (13.3x10.6") 
           s-diag: 433mm (17") 
           Monitor-1: VGA1 res: 1280x1024 hz: 60 dpi: 96 size: 340x270mm (13.4x10.6") 
           diag: 434mm (17.1") 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 2000 (SNB GT1) v: 3.3 Mesa 20.3.5 
           compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel 6 Series/C200 Series Family High Definition Audio vendor: Dell 
           driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1c20 class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.0-20-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel 82579LM Gigabit Network vendor: Dell driver: e1000e v: kernel 
           port: 3080 bus-ID: 00:19.0 chip-ID: 8086:1502 class-ID: 0200 
           IF: eth0 state: up speed: 10 Mbps duplex: half mac: <filter> 
Drives:    Local Storage: total: 1.82 TiB used: 212.32 GiB (11.4%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1500DL003-9VT16L size: 1.36 TiB 
           block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5900 
           serial: <filter> rev: CC32 scheme: MBR 
           ID-2: /dev/sdb maj-min: 8:16 type: USB vendor: Seagate model: ST350063 0AS 
           size: 465.76 GiB block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> 
           rev: E 
Partition: ID-1: / raw-size: 41.59 GiB size: 40.64 GiB (97.72%) used: 9.78 GiB (24.1%) fs: ext4 
           dev: /dev/sda1 maj-min: 8:1 
           ID-2: /home raw-size: 1.32 TiB size: 1.3 TiB (98.35%) used: 47.99 GiB (3.6%) fs: ext4 
           dev: /dev/sda3 maj-min: 8:3 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 3.62 GiB used: 193.1 MiB (5.2%) priority: -2 
           dev: /dev/sda2 maj-min: 8:2 
Sensors:   System Temperatures: cpu: 34.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     Packages: note: see --pkg apt: 2050 lib: 1003 flatpak: 0 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ bullseye main non-free
Info:      Processes: 244 Uptime: 8h 24m wakeups: 1 Memory: 3.72 GiB used: 2.08 GiB (55.9%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: BIOS (legacy, CSM, MBR)

Re: Mx21 -- copy files to external hdd

Posted: Fri Jan 13, 2023 4:59 pm
by pbear
inxi says the drive is attached but no partitions are mounted. Do you see the partition(s) in the left pane of File Manager? Does clicking one of them mount it? A screenshot would be helpful.

Re: Mx21 -- copy files to external hdd

Posted: Fri Jan 13, 2023 8:32 pm
by davidy
How old are they? Check your cables (blow the dust off) and gparted too.

Re: Mx21 -- copy files to external hdd

Posted: Sat Jan 14, 2023 5:26 pm
by rdotex
pbear wrote: Fri Jan 13, 2023 4:59 pm inxi says the drive is attached but no partitions are mounted. Do you see the partition(s) in the left pane of File Manager? Does clicking one of them mount it? A screenshot would be helpful.
Yes, the partitions show, and the ;contents of each do also. Also, I can click on oll of them and see the contents, which are available for all purposes. I use the ext hdd to simply copy my documents, etc, as a backup.

I also was able to create a folder for this 'backup', with no difficulty. BUT, I cannot paste even one file into that folder.

Re: Mx21 -- copy files to external hdd

Posted: Sat Jan 14, 2023 8:10 pm
by Huckleberry Finn

Code: Select all

sudo chown -R yourusername:yourusername /media/yourusername/*
(wherever it is mounted.. this one assumes it was under /media/...)

i.e.

sudo chown -R huck:huck /media/huck/*

You can also first make sure what your user id is (generally it's 1000 for the 1st created user)

Code: Select all

id
Then do it with that number, say :

sudo chown -R 1000:1000 /media/huck/*

Re: Mx21 -- copy files to external hdd

Posted: Sun Jan 15, 2023 12:05 am
by m_pav
What partition type does the external drive have? If it's a Windows type, then it may have some minor inconsistencies which is enough to cause the partition to become read-only. Debian Stable does not have full NTFS, ExFAT, or even FAT32 support, so our ability to rectify issues with these filesystems is limited. It's one of the very few reasons I leave a copy of Windows on a handful of my machines.

Keep a mind of what @Huckleberry Finn said, but make 1 change which I'll show below, which is especially useful for writes to the root of the drive/partition. HF's method changes all existing content on the drive/partition to you, but there is a better way to achieve RW access to any existing or new partition, that is to change the ownership of the dot file at the root of the partition. The dot file is a single full stop type of dot " . ", not the word as we read it, and it cannot be seen through a regular file browser like Thunar, though we invoke it when we run a command from the terminal, and if it's owned by you, then the whole partition is yours to do with as you please.

When first introducing a native format external drive, Instead of doing

Code: Select all

sudo chown -R yourusername:yourusername /media/drivename/*
change the asterisk to a dot

Code: Select all

sudo chown -R yourusername:yourusername /media/drivename/.
and the drive will be yours forever, no more fuss with changing ownership of mass folders and files, and it can be done an any internal or external drive/partition, whether it's fresh or already used, though, if it's already used, you'll have to do the command twice, once with the dot and another the asterisk .

Re: Mx21 -- copy files to external hdd

Posted: Sun Jan 15, 2023 10:01 am
by Huckleberry Finn
@m_pav thank you for that, very nice trick :)

Re: Mx21 -- copy files to external hdd

Posted: Wed Jan 18, 2023 1:46 pm
by rdotex
I'm sorry, I posted a reply yesterday that doesn't show here, so I guess this Old-fart did something wrong again. So, I'll try again now:

While waiting, I was fiddling around and found a way to paste into the folder on the ext hdd: right click on the folder, and then click on "Open Root Thunar here", and then I can paste into the folder.

Thanks to all the helpers!

Re: Mx21 -- copy files to external hdd

Posted: Wed Jan 18, 2023 1:52 pm
by Huckleberry Finn
Yes, but "for the very reason" all the above.. to give the ownership (and permission) to "user" .

Re: Mx21 -- copy files to external hdd

Posted: Thu Jan 19, 2023 12:27 am
by pbear
rdotex wrote: Wed Jan 18, 2023 1:46 pm ... right click on the folder, and then click on "Open Root Thunar here", and then I can paste into the folder.
As Huck says, you need to make yourself "owner" of the folder and its contents. Perhaps this will be easier. Copy this command:

Code: Select all

sudo chown -R $USER:$USER /media/$USER/*
Open Terminal; select Edit > Paste; hit Enter; type in your password when prompted.
No need to modify or customize anything. Run that command, exactly as given, and your problem will be solved.
Only thing you need to be sure of: The folder has to be mounted. In the left pane of File Manager, look for a little triangle next to the folder.

Re: Mx21 -- copy files to external hdd

Posted: Thu Jan 19, 2023 8:30 am
by fehlix
All got advice's so far. But as OP has not mentioned what file system is involved,
this chmod/chown attempts to fix permissions will not survive a reboot on filessystem which don't hold permissions/ownership like NTFS, exFAT or FAT.
So suggets, some information needed like - as already requested - what file system is involved.
And also content of /etc/fstab, incase it's mounted through fstab.

Re: Mx21 -- copy files to external hdd

Posted: Fri Jan 20, 2023 4:10 pm
by rdotex
Also, I would like to know how this got 'screwed up'? I have been using this ext hdd for several years and have never had this trouble before, so what changed?

Ron

Re: Mx21 -- copy files to external hdd

Posted: Fri Jan 20, 2023 4:46 pm
by Huckleberry Finn
If you had done (re)partitioning etc. : GParted gives the ownership to root by default.

(However you still didn't tell anything about the format. If it's ntfs, simply use the "Disk Manager" from menu.)

Re: Mx21 -- copy files to external hdd

Posted: Fri Jan 20, 2023 11:48 pm
by m_pav
rdotex wrote: Fri Jan 20, 2023 4:10 pm Also, I would like to know how this got 'screwed up'? I have been using this ext hdd for several years and have never had this trouble before, so what changed?
As you have not assisted us to assist you by telling us what partition type is used on the drive, we can only toss out guesses and nothing more. Please re-read my earlier response on page 1 of this thread. If it's a Microsoft type of partition, dirty flag caused by improper dismount or other is the MOST probably response, followed by a failing drive. It is possible to write data to a "dirty" Microsoft type partition as root in Linux, but it almost inevitably will be at great risk to content already on the drive and entirely possible the data you wrote as root may be compromised.

If it's a Linux type filesystem, permissions is the most probable response, and they're drop dead easy to change, and we have all tried to assist, but can go no further until we know what we're dealing with.

Re: Mx21 -- copy files to external hdd

Posted: Sat Jan 21, 2023 2:45 pm
by rdotex
pbear wrote: Thu Jan 19, 2023 12:27 am
rdotex wrote: Wed Jan 18, 2023 1:46 pm ... right click on the folder, and then click on "Open Root Thunar here", and then I can paste into the folder.
As Huck says, you need to make yourself "owner" of the folder and its contents. Perhaps this will be easier. Copy this command:

Code: Select all

sudo chown -R $USER:$USER /media/$USER/*
Open Terminal; select Edit > Paste; hit Enter; type in your password when prompted.
No need to modify or customize anything. Run that command, exactly as given, and your problem will be solved.
Only thing you need to be sure of: The folder has to be mounted. In the left pane of File Manager, look for a little triangle next to the folder.
I've tried this several times just now, but it doesn't seem to work for me!

Re: Mx21 -- copy files to external hdd

Posted: Sat Jan 21, 2023 2:55 pm
by rdotex
m_pav wrote: Fri Jan 20, 2023 11:48 pm
rdotex wrote: Fri Jan 20, 2023 4:10 pm Also, I would like to know how this got 'screwed up'? I have been using this ext hdd for several years and have never had this trouble before, so what changed?
As you have not assisted us to assist you by telling us what partition type is used on the drive, we can only toss out guesses and nothing more. Please re-read my earlier response on page 1 of this thread. If it's a Microsoft type of partition, dirty flag caused by improper dismount or other is the MOST probably response, followed by a failing drive. It is possible to write data to a "dirty" Microsoft type partition as root in Linux, but it almost inevitably will be at great risk to content already on the drive and entirely possible the data you wrote as root may be compromised.

If it's a Linux type filesystem, permissions is the most probable response, and they're drop dead easy to change, and we have all tried to assist, but can go no further until we know what we're dealing with.
It shows to be an 'ext4' file type. I have only Linux type files, no Windows at all.

Re: Mx21 -- copy files to external hdd

Posted: Sat Jan 21, 2023 3:18 pm
by Huckleberry Finn
rdotex wrote: Sat Jan 21, 2023 2:45 pm... I've tried this several times just now, but it doesn't seem to work for me!
rdotex wrote: Sat Jan 21, 2023 2:55 pm... It shows to be an 'ext4' file type...
Ok, but as I mentioned in post #7: You need to type the path according to wherever it is mounted. And also "when" it is mounted.

So: First simply click and open it using the file manager (just to make it mounted).

Then also have a look where it gets mounted: Look at the address bar in file manager, or in a terminal: lsblk


Cause, say, if I do any of these :

sudo chown -R huck:huck /media/huck/*

sudo chown -R 1000:1000 /media/huck/*

sudo chown -R $USER:$USER /media/$USER/*


when i.e. my sdb gets mounted somewhere else , say under /mnt/.../

it won't work.. as this command aims at /media/... (as generally it is so)

Re: Mx21 -- copy files to external hdd

Posted: Sat Jan 21, 2023 9:32 pm
by pbear
rdotex wrote: Sat Jan 21, 2023 2:45 pm I've tried this several times just now, but it doesn't seem to work for me!
Was there any message or error report? Had you made sure the partition was mounted?

Consistent with Huck's last post, please report the output of lsblk -f. Again, be sure the partition is mounted.
And confirm which partition in the lsblk report is the one you're having trouble with.

Finally, further to m_pav's hypothesis of a failing drive, please report the output of sudo mount | grep ro, (use copy-and-paste, and be sure to include the comma).

Re: Mx21 -- copy files to external hdd

Posted: Sat Aug 05, 2023 7:48 pm
by MXRobo
m_pav wrote: Sun Jan 15, 2023 12:05 am When first introducing a native format external drive, Instead of doing

Code: Select all

sudo chown -R yourusername:yourusername /media/drivename/*
change the asterisk to a dot

Code: Select all

sudo chown -R yourusername:yourusername /media/drivename/.
and the drive will be yours forever, no more fuss with changing ownership of mass folders and files, and it can be done an any internal or external drive/partition, whether it's fresh or already used, though, if it's already used, you'll have to do the command twice, once with the dot and another the asterisk .
Thanks @m_pav , additionally, it changed the root ownership in permissions to me of some existing folders in an external hdd that I recently placed there via "Open root Thunar here".
I like easy! :number1: