Cannot read external drive XFS partition

Hi! I can mount and read/write NTFS partition of external hard drive just fine but I cannot read its XFS partition. I can view its folders and files but when I try to open and/or copy them, I get permission error. I’m on my university’s computer so I do not have a root access to modify fstab, polkit, udev rules, etc. What should I do to have access to this partition? Thanks in advance.

As it is a permission case (as the message says), it has nothing to do with the fact that it is a mounted file system. It is about ownership (by uid and gid) and permissions. The same as with every other file in the system.

Check with

ls -l

who is the wner and what the permissions are.
And do not forget the persmiisions of the path to the files, that includes the mount point.

Thanks for your prompt reply. It indeed seems to be a permission issue.

The output of ls -l reads:


drwxr-xr-x   6 1000 klein   99 Dec  3 03:08 Folder0/
drwxr-xr-x  21 1000 klein 4.0K Dec 15 08:26 Folder1/
drwxr-xr-x  11 1000 klein 4.0K Dec 11 05:19 Folder2/
drwxr-xr-x   2 1000 klein 4.0K Aug 18 01:42 Folder3/
drwxr-xr-x 104 1000 klein 8.0K Aug 18 01:42 Folder4/
drwxr-xr-x   9 1000 klein  137 Dec 11 06:08 Folder5/
drwxr-xr-x   2 1000 klein    6 Dec 11 12:18 Folder6/
drwxr-xr-x   9 1000 klein  147 Dec 11 05:20 Folder7/
drwxr-xr-x   4 1000 klein   36 Dec 11 06:40 Folder8/
drwxr-xr-x   9 1000 klein 4.0K Aug 18 01:49 Folder9/
drwxrwxr-x  13 1000 klein 4.0K Dec 24  2014 Folder10/
drwxr-xr-x  21 1000 klein 4.0K Dec  3 03:37 Folder11/
drwxr-xr-x   3 1000 klein   21 Dec 15 09:23 Folder12/

where klein is not my username.

For mount point:


drwx------  1 priyc priyc  20K Dec 18 10:07 Paranoia/
drwxr-xr-x 15  1000 klein 4.0K Dec 15 08:51 Petrichoria/

Here, Paranoia is the NTFS partition, of which I do have the ownership

I have since installed Arch Linux on Virtualbox and have given the guest system USB access, but it cannot detect the external hard drive either (It doesn’t show up in lsusb output.)
All I want to do is copy some files from the external drive.

Have you tried to share the folder? In the VirtualBox GUI, right click over the virtual machine name “Configuration” -> “Shared Folder”. Check the box for automount and when you starts the virtual machine, the shared folder will be appear under /media/[shared_folder_name]. As root in the virtual machine you can copy the files and change permissions of the copied files as you need.

Ownership by 1000:klein

It means that the user owning the files has uid 1000 and there is apperently no user with uid 1000 on your system.

It means that the group owning the files is klein. That is, there is a gid there (we can not see which one, for that you have to do

ls -ln

) and that gid has groupname klein on your system.

Remind that ownership in Unix/Linux is by uid and gid (the numbers). On every Unix/Linux system these uid and gid may be configured or not. The consequence is that when you move a file system from one Unix/Linux system to another (either by using NFS or by removable mass-storage devices), there is a security problem.

In fact this file system is most probably created and files put upon it on another system with another user and group (and probably with another human owner behind that).

Thus you must ask yourself if you realy should have the permissions to mess around (reading and writing) on that file system, which seems to belong to someone else.

Of course, as mentioned above, using root you can change ownership, etc. but ask yourself if that is realy a proper thing to do.

You do not have these “problems” with non-Linux like file systems like NTFS for the simple reason that there is no ownership, nor permissions on such a file sytem. What you see is fake. And that means of course that any security there is not available. But again there is the moral question if you are allowed to read and write on such a file sytem that may belong to someone else.

Thanks for your replies **feliciano28! **I did try to automount but my mount folder comes out as empty.

Thanks for explaining permissions **hcvv! **That was very helpful and a gentle reminder to me that I need to take permissions seriously. On

ls -ln

I receive the same reply as before except klein is now replaced by 1000. By digging deep inside the sub folders in that file system, I noticed even weirder permissions such as:


-rwxr----- 1 1000 1000 12782517 Mar 25  2015 01. Nahi Melun Re.mp3
-rw-r--r-- 1 1000 1000  2560065 Dec  3 01:37 01. Nahi Melun Re.m4a

Of course there is only a single human owner of all the files on the system. The permissions are messed up because the partition has files copied over by my old and my parents’ laptop. I used to be a “distro-hopper” and I, being ignorant of ownership, had used different usernames on those distros. But in those systems, I would simply sudo chown every time I needed to copy something to partition.

Sorry, I forgot to mention than you have to select the folder that you have mounted the XFS partition on your laptop when you configure the “Shared Folder” in VirtualBox. Did you do it?

Thanks for replying again! I had tried that also but it didn’t work either.
Finally, I tried to mount the drive as a raw disk and it worked! :slight_smile: Thanks for suggestions and explanations!