External drive acting as if it's read-only when formatted as xfs or ext4

I have a Seagate 2tb external hard drive that I had previously used formatted as NTFS in the past when I was a Windows user. I recently reformatted it as xfs and I’m running into issues. I can’t create files on the drive, nor can I move files to the drive, and Steam (I plan to download some of my larger games onto this drive) won’t detect it. The drive mounts just fine and when I run mount | grep portable, I get /dev/sda1 on /run/media/cora/portable type xfs (rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota), indicating that it’s read-write.
The problem doesn’t occur when formatting the drive as both NTFS or exfat (however, I’d prefer to be able to format it as xfs.)
Partition & format info:

NAME        TYPE   SIZE PTTYPE FSTYPE
sda         disk   1.8T dos    
└─sda1      part   1.8T dos    xfs
sdb         disk     0B        
sdc         disk     0B        
nvme0n1     disk 476.9G gpt    
├─nvme0n1p1 part     1G gpt    vfat
└─nvme0n1p2 part 475.9G gpt    ext4

My fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# 1st 2 are internal ssd
# 3rd is internal
# 4th is swap
# 5th is external drive
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=B789-852F                            /efi           vfat    fmask=0137,dmask=0027 0 2
UUID=18e4f4d2-5d50-4df2-863c-49992b4d53f4 /              ext4    noatime    0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
/swapfile                                 none           swap    defaults   0 0
UUID=564a715c-0fad-4d87-9ce1-38a01ba4850e /run/media/cora/portable xfs rw,defaults,noatime,nofail 0 3

Hardware info:

System:
  Kernel: 6.13.8-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
  Desktop: Xfce v: 4.20.1 tk: Gtk v: 3.24.48 wm: xfwm4 dm: SDDM
    Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20Y50011US v: ThinkPad X1 Extreme Gen
    4i serial: <superuser required> Chassis: type: 10
    serial: <superuser required>
  Mobo: LENOVO model: 20Y50011US v: SDK0J40697 WIN
    serial: <superuser required> part-nu: LENOVO_MT_20Y5_BU_Think_FM_ThinkPad
    X1 Extreme Gen 4i UEFI: LENOVO v: N40ET47W (1.29 ) date: 07/31/2024
Battery:
  ID-1: BAT0 charge: 73.7 Wh (99.2%) condition: 74.3/90.1 Wh (82.5%)
    volts: 17.4 min: 15.5 model: SMP 5B11B79217 serial: <filter>
    status: not charging
CPU:
  Info: 8-core model: 11th Gen Intel Core i7-11850H bits: 64 type: MT MCP
    arch: Tiger Lake rev: 1 cache: L1: 640 KiB L2: 10 MiB L3: 24 MiB
  Speed (MHz): avg: 3441 min/max: 800/4800 cores: 1: 3441 2: 3441 3: 3441
    4: 3441 5: 3441 6: 3441 7: 3441 8: 3441 9: 3441 10: 3441 11: 3441 12: 3441
    13: 3441 14: 3441 15: 3441 16: 3441 bogomips: 79872
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: NVIDIA GA104M [GeForce RTX 3070 Mobile / Max-Q] vendor: Lenovo
    driver: nvidia v: 570.133.07 arch: Ampere pcie: speed: 2.5 GT/s lanes: 16
    ports: active: none off: HDMI-A-1,eDP-1 empty: DP-1,DP-2 bus-ID: 01:00.0
    chip-ID: 10de:249d
  Device-2: Luxvisions Innotech Integrated RGB Camera driver: uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-8:6 chip-ID: 30c9:0032
  Display: x11 server: X.Org v: 21.1.16 with: Xwayland v: 24.1.6
    compositor: xfwm4 v: 4.20.0 driver: X: loaded: nvidia unloaded: modesetting
    alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 3460x1080 s-dpi: 291
  Monitor-1: not-matched mapped: DP-2 pos: left res: 3840x2400 hz: 60
    dpi: 284 diag: 406mm (15.97")
  Monitor-2: not-matched mapped: HDMI-0 pos: primary,right res: 1920x1080
    hz: 60 dpi: 82 diag: 686mm (27.01")
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia gbm: drv: nvidia
    surfaceless: drv: nvidia x11: drv: nvidia inactive: wayland
  API: OpenGL v: 4.6.0 vendor: nvidia v: 570.133.07 glx-v: 1.4
    direct-render: yes renderer: NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2
  API: Vulkan v: 1.4.309 surfaces: xcb,xlib device: 0 type: discrete-gpu
    driver: N/A device-ID: 10de:249d
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo de: kscreen-console,
    kscreen-doctor, xfce4-display-settings gpu: nvidia-smi wl: wayland-info
    x11: xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel Tiger Lake-H HD Audio vendor: Lenovo
    driver: sof-audio-pci-intel-tgl bus-ID: 00:1f.3 chip-ID: 8086:43c8
  Device-2: NVIDIA GA104 High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:228b
  Device-3: DisplayLink Plugable UD-3900PDH driver: cdc_ncm,snd-usb-audio
    type: USB rev: 3.2 speed: 5 Gb/s lanes: 1 bus-ID: 2-2.1:3 chip-ID: 17e9:4323
  Device-4: Samson GoMic compact condenser mic
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 bus-ID: 3-1:2 chip-ID: 17a0:0305
  API: ALSA v: k6.13.8-arch1-1 status: kernel-api
  Server-1: PipeWire v: 1.4.1 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel Wi-Fi 6E AX210/AX1675 2x2 [Typhoon Peak] driver: iwlwifi
    v: kernel pcie: speed: 5 GT/s lanes: 1 bus-ID: 09:00.0 chip-ID: 8086:2725
  IF: wlan0 state: down mac: <filter>
  IF-ID-1: enp0s13f0u2u1i5 state: up speed: 1000 Mbps duplex: half
    mac: <filter>
Bluetooth:
  Device-1: Intel AX210 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 3-14:10 chip-ID: 8087:0032
  Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 5.3
    lmp-v: 12
Drives:
  Local Storage: total: 2.29 TiB used: 342.09 GiB (14.6%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVL2512HCJQ-00BL7
    size: 476.94 GiB speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 50.9 C
  ID-2: /dev/sda vendor: Seagate model: Portable size: 1.82 TiB type: USB
    rev: 3.0 spd: 5 Gb/s lanes: 1 serial: <filter>
Partition:
  ID-1: / size: 467.4 GiB used: 306.04 GiB (65.5%) fs: ext4
    dev: /dev/nvme0n1p2
Swap:
  ID-1: swap-1 type: file size: 8 GiB used: 4.12 GiB (51.5%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 67.0 C mobo: N/A
  Fan Speeds (rpm): fan-1: 3171 fan-2: 2781
Info:
  Memory: total: 16 GiB note: est. available: 15.39 GiB
    used: 10.71 GiB (69.6%)
  Processes: 452 Power: uptime: 2d 25m wakeups: 0 Init: systemd v: 257
    default: graphical
  Packages: pm: pacman pkgs: 1400 Compilers: gcc: 14.2.1 Shell: Bash
    v: 5.2.37 running-in: xfce4-terminal inxi: 3.3.37

Create a folder under your home directory, and try mounting it there. These sorts of things are typically a permissions issue inherited from the directory it’s mounted under.

Under normal circumstances, you should have no issue read/writing to a directory within your home directory.

NTFS and exfat likely work because they have no concept of Linux file-system permissions.

1 Like

You can try taking ownership of the mountpoint:

sudo chown $USER: /run/media/cora/portable

1 Like

Thanks everyone for the quick responses. It seems like it was a permissions issue.

1 Like

@zoobnash

Since /run is a temporary filesystem for storing data which is only relevant for the running session and will be cleared out after reboot, even if systemd would recreate your mountpoint, I am not sure if the ownership persists.The system may reset the ownership and permissions of the mount point at boot.

I have never tried myself to mount something under /run via fstab to be sure. I don’t know either if you can set the adequate permissions in the fstab.

If you will have issues again with the ownership of the mountpoint after reboot, the better option would be to mount your disk somewhere else in the filesystem, under home as suggested by @Bink or anywhere.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.