user #99 copying files from external HD.

stratblue

Member
Joined
Sep 20, 2021
Messages
49
Reaction score
4
Credits
437
Hi.

I am trying to copy some files from an Apple Mac external HD to an internal SSD on Elementary OS Odin but I am told that some files cannot be copied due to permissions problems. I have looked at the permissions of the enclosing folder and it says owner is user #99 (unknown user apparently), groups is 99 and the drop down menus are greyed out and not usable. Inside the folder some files have a no entry sign and others don't but both kinds of file have the same permissions as the enclosing folder. I can copy and open the ones without the no entry sign.

I have tried ls -l
usable file: -rw-r--r-- 1 99 99 97312 Aug 20 2008 then the file path in red
no entry file: -rw------- 1 99 99 145820 May 8 2019 then the file path in red
.
Then I tried chmod u+rw on the files and the folder but nothing has changed.

I've only been using Linux for a week so if someone could show me the error of my ways it would be great.

Thanks.
 


captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,546
Reaction score
1,685
Credits
15,201
So as we are clear, you've got an external HD that was previoiusly used with an apple MAc.

Might be the file type or way AppleMAc does things.

As an example to examine a bit - i have an SD card in the slot in mu laptop.

sudo fdisk -l bring up the SD card as : /dev/sdb

so i use : lsblk -o +FSTYPE /dev/sdb

to have a look :
Code:
[[email protected]:~]$ lsblk -o +FSTYPE  /dev/sdb                           (09-25 21:21)
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS                 FSTYPE
sdb      8:16   1 28.9G  0 disk
└─sdb1   8:17   1 28.9G  0 part /run/media/andrew/7569-5EFD vfat
[[email protected]:~]$

SO the above shows me its mounted at : /run/media/andrew/7569-5EFD

and the file type on sdb1 is vfat


cAn you give the output on yours using similar approach to above ?

Also what you might be able to do is use mount remount wit hread write

ps you did use :" sudo" in your command to change permissions ?


that should get things rolling & others i'm sure will chip in :^)
 
OP
S

stratblue

Member
Joined
Sep 20, 2021
Messages
49
Reaction score
4
Credits
437
So as we are clear, you've got an external HD that was previoiusly used with an apple MAc.

Might be the file type or way AppleMAc does things.

As an example to examine a bit - i have an SD card in the slot in mu laptop.

sudo fdisk -l bring up the SD card as : /dev/sdb

so i use : lsblk -o +FSTYPE /dev/sdb

to have a look :
Code:
[[email protected]:~]$ lsblk -o +FSTYPE  /dev/sdb                           (09-25 21:21)
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS                 FSTYPE
sdb      8:16   1 28.9G  0 disk
└─sdb1   8:17   1 28.9G  0 part /run/media/andrew/7569-5EFD vfat
[[email protected]:~]$

SO the above shows me its mounted at : /run/media/andrew/7569-5EFD

and the file type on sdb1 is vfat


cAn you give the output on yours using similar approach to above ?

Also what you might be able to do is use mount remount wit hread write

ps you did use :" sudo" in your command to change permissions ?


that should get things rolling & others i'm sure will chip in :^)
Hey Captain.

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT FSTYPE
sdd 8:48 0 3.7T 0 disk
├─sdd1 8:49 0 200M 0 part vfat
└─sdd2 8:50 0 3.7T 0 part /media/MyName/G Tech 4Gb hfsplus

I have just tried using sudo with chmod but it didn't do anything.
 
OP
S

stratblue

Member
Joined
Sep 20, 2021
Messages
49
Reaction score
4
Credits
437
To add to the above, you can try 'chown <user>:<user> /path/to/files/or/directory' to take ownership of the files.
Just tried sudo chown MyName file path, it says 'changing ownership' but then it says 'read only file system' and nothing has changed that I can see.
 

captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,546
Reaction score
1,685
Credits
15,201
ok that explains it at end of line starting sdd2 hfsplus thats a mac file system, not defaultly recongised . so approach is going to be install hfsplus package and work fomr there

just saw new post so stopped writing ..
 

captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,546
Reaction score
1,685
Credits
15,201
so this is going to be the agenda i think @stratblue :


1) try this :


open up a shell window

run sudo fdisk to get dev info on external hd lets say its mounted
/media/MyName/G
then :

sudo mount -t hfsplus -o remount,force,rw /media/MyName/G


//quick to see if yo ucan do anything

2)
confirm elementary is Debian family based abd has either apt-get or apt
update apt
use apt and then search for hfsplus package
(thats so that hopefully fiel system can be recognised by linux)
install hfsplus or equivalent
fdisk -l to confirm disk

create a mount point
manually mount the external hard disk

maybe use of fsck.hfsplus to check /repair if necessary

last bit .. i will think about it


Can you try and go through those steps and see how far you get
 
Last edited:

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
4,059
Reaction score
3,725
Credits
32,592

Oldhabbits

Member
Joined
May 24, 2021
Messages
33
Reaction score
33
Credits
211
I'm afraid it won't work as expected, guys, on my imac system I'm getting "hfsplus: write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only." Even when forced, any normal user account does not have write access, only root can... But I'm not sure (and worried) what it will do with the journaling of this file system, though ?
 
Last edited:

captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,546
Reaction score
1,685
Credits
15,201
I'm afraid it won't work as expected, guys, on my imac system I'm getting "hfsplus: write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only." Even when forced, any normal user account does not have write access, only root can... But I'm not sure (and worried) what it will do with the journaling of this file system, though ?
Are you saying that lateral thinking suggests get a new Mac and copy files from external HD to new Mac ?
 

Oldhabbits

Member
Joined
May 24, 2021
Messages
33
Reaction score
33
Credits
211
No, I'm saying "hfsplus: write access to a journaled filesystem is not supported" !
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
4,059
Reaction score
3,725
Credits
32,592
I've never worked with that format, so can only help with the bits posted above. I mean, you could try the force option - so read the man page and see what it has to say.
 
OP
S

stratblue

Member
Joined
Sep 20, 2021
Messages
49
Reaction score
4
Credits
437
so this is going to be the agenda i think @stratblue :


1) try this :


open up a shell window

run sudo fdisk to get dev info on external hd lets say its mounted
/media/MyName/G
then :

sudo mount -t hfsplus -o remount,force,rw /media/MyName/G


//quick to see if yo ucan do anything

2)
confirm elementary is Debian family based abd has either apt-get or apt
update apt
use apt and then search for hfsplus package
(thats so that hopefully fiel system can be recognised by linux)
install hfsplus or equivalent
fdisk -l to confirm disk

create a mount point
manually mount the external hard disk

maybe use of fsck.hfsplus to check /repair if necessary

last bit .. i will think about it


Can you try and go Through those steps and see how far you get
Hey Captain.

You're going a bit fast for me there! I have installed the hfsplus package, that hasn't changed anything. I ran the fdisk command again and there is a lot of of info there, mayybe 20 entries all different sizes. I got rid of the G tech disk from before but the problem is the same on the other disks I have, how do I associate a physical disk with and entry in the Shell? I don't really know what I'm looking at.
 

captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,546
Reaction score
1,685
Credits
15,201
lets start with some output then :

attach your external hard drive and first run :
Code:
 fdisk -l

here's mine :
Code:
Disk /dev/sdb: 28.93 GiB, 31058821120 bytes, 60661760 sectors
Disk model: SD/MMC/MS PRO
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1        8192 60661759 60653568 28.9G  c W95 FAT32 (LBA)

also we can double check , generally external hd , sd card and usb get mounted to /media

here's mine
Code:
[[email protected]:~]$ mount | grep "/media"                                (09-27 09:53)
/dev/sdb1 on /run/media/andrew/7569-5EFD type vfat (rw,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)
[[email protected]:~]$

to copy from shell if it doesn't have menu with copy you can use ctrl + shift+ c

ctrl+shift + v to paste or you run command to a file and use any simple file editor eg
Code:
[[email protected]:~]$ mount > /home/andrew/Desktop/mount.txt               (09-27 09:58)
substitute andrew for your user name

/dev/sdb represents my SD card and /dev/sdb1 represnts a partiton on the SD card



/run/media/andrew/7569-5EFD represents where /dev/sdb1 is atctually on my PC

So if i use a shell and go to that loacation my directories etc with files in them should be there.

eg

Code:
cd /run/media/andrew                                 (09-27 10:00)
[[email protected]:media/andrew]$ ls                                        (09-27 10:03)
7569-5EFD/
[[email protected]:media/andrew]$ cd 7569-5EFD                              (09-27 10:03)
[[email protected]:andrew/7569-5EFD]$ ls                                    (09-27 10:03)
AAArchLaptop/                    cosmetics2021/         miscellaneous/
AArchive_photographs/  
....

ps for those that are wondering re: cosmetics2021 dir - no i'm not a cross dresser thats the folder where i keep data on my emulsification experiments for wifes start up cosmetic idea involving HLB Hydrophilic-Lipophilic Balance etc


Once we have hd mounted and know path to mount thats when next we try to re-mount

also we can try the other post ideas eg in my case :
Code:
sudo chown andrew:users   /run/media/andrew/7569-5EFD  -R
 
Last edited:
OP
S

stratblue

Member
Joined
Sep 20, 2021
Messages
49
Reaction score
4
Credits
437
lets start with some output then :

attach your external hard drive and first run :
Code:
 fdisk -l

here's mine :
Code:
Disk /dev/sdb: 28.93 GiB, 31058821120 bytes, 60661760 sectors
Disk model: SD/MMC/MS PRO
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1        8192 60661759 60653568 28.9G  c W95 FAT32 (LBA)

also we can double check , generally external hd , sd card and usb get mounted to /media

here's mine
Code:
[[email protected]:~]$ mount | grep "/media"                                (09-27 09:53)
/dev/sdb1 on /run/media/andrew/7569-5EFD type vfat (rw,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)
[[email protected]:~]$

to copy from shell if it doesn't have menu with copy you can use ctrl + shift+ c

ctrl+shift + v to paste or you run command to a file and use any simple file editor eg
Code:
[[email protected]:~]$ mount > /home/andrew/Desktop/mount.txt               (09-27 09:58)
substitute andrew for your user name

/dev/sdb represents my SD card and /dev/sdb1 represnts a partiton on the SD card



/run/media/andrew/7569-5EFD represents where /dev/sdb1 is atctually on my PC

So if i use a shell and go to that loacation my directories etc with files in them should be there.

eg

Code:
cd /run/media/andrew                                 (09-27 10:00)
[[email protected]:media/andrew]$ ls                                        (09-27 10:03)
7569-5EFD/
[[email protected]:media/andrew]$ cd 7569-5EFD                              (09-27 10:03)
[[email protected]:andrew/7569-5EFD]$ ls                                    (09-27 10:03)
AAArchLaptop/                    cosmetics2021/         miscellaneous/
AArchive_photographs/
....

ps for those that are wondering re: cosmetics2021 dir - no i'm not a cross dresser thats the folder where i keep data on my emulsification experiments for wifes start up cosmetic idea involving HLB Hydrophilic-Lipophilic Balance etc


Once we have hd mounted and know path to mount thats when next we try to re-mount

also we can try the other post ideas eg in my case :
Code:
sudo chown andrew:andrew   /run/media/andrew/7569-5EFD  -R

Hey there.

sudo fdisk -l gives me:

Disk /dev/loop0: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 99.35 MiB, 104169472 bytes, 203456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 244.9 MiB, 256774144 bytes, 501512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 164.78 MiB, 172761088 bytes, 337424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 61.79 MiB, 64770048 bytes, 126504 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 55.45 MiB, 58130432 bytes, 113536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 187.84 MiB, 196939776 bytes, 384648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 32.31 MiB, 33869824 bytes, 66152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 223.58 GiB, 240057409536 bytes, 468862128 sectors
Disk model: SanDisk SDSSDXPS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C6433E4D-22A7-4C2D-90B1-41AE5620D820

Device Start End Sectors Size Type
/dev/sda1 4096 542966 538871 263.1M EFI System
/dev/sda2 542968 468858030 468315063 223.3G Linux filesystem


Disk /dev/sdb: 447.13 GiB, 480103981056 bytes, 937703088 sectors
Disk model: SanDisk SDSSDHII
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3C917F44-AC87-4200-9539-335444626B24

Device Start End Sectors Size Type
/dev/sdb1 40 409639 409600 200M EFI System
/dev/sdb2 411648 937439231 937027584 446.8G Microsoft basic data


Disk /dev/sdc: 447.13 GiB, 480103981056 bytes, 937703088 sectors
Disk model: SanDisk SDSSDX48
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 223015EE-6BC3-4EBB-BE72-4B3E5C3CE5F0

Device Start End Sectors Size Type
/dev/sdc1 40 409639 409600 200M EFI System
/dev/sdc2 411648 937439231 937027584 446.8G Microsoft basic data


Disk /dev/mapper/data-root: 219.5 GiB, 235677941760 bytes, 460308480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/data-swap: 3.84 GiB, 4097835008 bytes, 8003584 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes




Disk /dev/loop8: 32.32 MiB, 33878016 bytes, 66168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 161.95 MiB, 169791488 bytes, 331624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 65.1 MiB, 68259840 bytes, 133320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop11: 65.22 MiB, 68378624 bytes, 133552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop12: 132.21 MiB, 138629120 bytes, 270760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop13: 140 KiB, 143360 bytes, 280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop14: 162.5 MiB, 169922560 bytes, 331880 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop15: 295.73 MiB, 310079488 bytes, 605624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/cryptswap: 3.84 GiB, 4097310720 bytes, 8002560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sde: 3.65 TiB, 4000787030016 bytes, 976754646 sectors
Disk model: d2 USB3
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 268431360 bytes
Disklabel type: gpt
Disk identifier: 7760EAC7-187D-4276-B09B-311EE767EE14

Device Start End Sectors Size Type
/dev/sde1 6 76805 76800 300M EFI System
/dev/sde2 77056 976721663 976644608 3.7T Microsoft basic data


Disk /dev/loop16: 8.61 MiB, 9011200 bytes, 17600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdf: 4.56 TiB, 5000981078016 bytes, 1220942646 sectors
Disk model: d2 USB3
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 268431360 bytes
Disklabel type: gpt
Disk identifier: 5D763571-82C0-44DB-92D3-2B36B2603812

Device Start End Sectors Size Type
/dev/sdf1 6 76805 76800 300M EFI System
/dev/sdf2 76806 1220909872 1220833067 4.6T Apple HFS/HFS+


I have 3 SSDs inside and two external USB drives.
 
OP
S

stratblue

Member
Joined
Sep 20, 2021
Messages
49
Reaction score
4
Credits
437
I'm guessing that the /dev/sdf 4.56 drive referred to above is my 5Tb usb drive, although that reports as 5TB in Nautilus. Do I have to look at the sizes to work out what's what?
 

captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,546
Reaction score
1,685
Credits
15,201
well one way is via knowing how /dev/ are numbered

/dev/sda is one HD
/dev/sdb 2nd
/dev/sdc 3rd


So 2 things we are only interested in external that has the problem files.
One quick way detach both external usb/hd and run fdisk again. SO we get output for fixed hd's
we can then deduct that data from later output


Then attach the problem hd and run again ; i know you already did that but you chnaged something then i didn't know you had 2 externals .

First we try

Also we know that fixed hd's are in /etc/fstab whereas usually usb/external get mounted to media so also give output of (as nrmal user no sudo)

Code:
mount | grep "media"
 
Last edited:
OP
S

stratblue

Member
Joined
Sep 20, 2021
Messages
49
Reaction score
4
Credits
437
Ok, I''l pull all the extra internal HD's and externals except the problems one and report back here later.
so this is going to be the agenda i think @stratblue :


1) try this :


open up a shell window

run sudo fdisk to get dev info on external hd lets say its mounted
/media/MyName/G
then :

sudo mount -t hfsplus -o remount,force,rw /media/MyName/G


//quick to see if yo ucan do anything

2)
confirm elementary is Debian family based abd has either apt-get or apt
update apt
use apt and then search for hfsplus package
(thats so that hopefully fiel system can be recognised by linux)
install hfsplus or equivalent
fdisk -l to confirm disk

create a mount point
manually mount the external hard disk

maybe use of fsck.hfsplus to check /repair if necessary

last bit .. i will think about it


Can you try and go through those steps and see how far you get
sudo mount -t hfpsplus -o remount,force,rw /media/MyName/Old Stuff

returns 'mount: Stuff: mount point does not exist.'

I have only 2 disks now, the internal SSD and an external 5Tb USB disk from the Mac called 'Old Stuff'.
 
OP
S

stratblue

Member
Joined
Sep 20, 2021
Messages
49
Reaction score
4
Credits
437
mount | grep "/media"

returns : '/dev/sdg2 on /media/MyName/Old Stuff type hfsplus (ro,nosuid,nodev,relatime,umask=22,uid=1000,gid=1000,nls=utf8,uhelper=udisks2)'

The word 'media' is in red.
 

captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,546
Reaction score
1,685
Credits
15,201
Ok is that a Space between Old and Stuff or an underscore not showing or something else
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Staff online

Members online


Top