Score:2

Missing executable permissions on secondary internal disk

kr flag

I've just installed Ubuntu Studio after migrating from Manjaro, and every time I run Android Studio (which is installed in my secondary drive, which is mounted in ~/Storage) I get the following error:

The program '/home/myms/Storage/04 ANDROID STUDIO/android-studio/bin/studio.sh' is missing executable permissions.

Image

This happens with every execution command from this drive. I tried sudo chmod a+rwx ~/Storage but that made no difference, I know it's about the file being executable, I already checked that.

The read and write permissions work fine, it's just the execution permissions.

The output of ls -l '/home/myms/../studio.sh'

-rwxrwxr-x 1 myms myms 6603 Sep  7 17:55 '/home/myms/Storage/04 ANDROID STUDIO/android-studio/bin/studio.sh'

The output of sudo blkid -c /dev/null:

/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/sda1: LABEL_FATBOOT="NO_LABEL" LABEL="NO_LABEL" UUID="9506-4F7D" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="7e565882-2596-8e4e-81db-46a214695139"
/dev/sda2: UUID="726a12dd-9d6a-4cdb-9186-ac454f33546f" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="root" PARTUUID="ca46cde7-fb4e-1648-a88e-30701ba0489d"
/dev/sdb1: LABEL="Storage" UUID="efc6bf95-a436-4d02-b544-6f9ca414ae9f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="5d5db06e-01"

The output of ls -l:

...
drwxrwxrwx 14 myms myms     4096 Oct 23 18:32 Storage
...

The output of ./pathlld /dev/sdb1:

drwxr-xr-x 19 root root 4096 Oct 24 09:04 /
/dev/sda2 on / type ext4 (rw,relatime,discard)
drwxr-xr-x 23 root root 4640 Oct 25 07:25 /dev
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3980132k,nr_inodes=995033,mode=755,inode64)
brw-rw---- 1 root disk 8, 17 Oct 25 07:25 /dev/sdb1

System info summary:

  • Distro: Ubuntu 21.10 (Impish Indri)
  • Kernel: 5.13.0-20-lowlatency x86_64
  • Desktop: KDE Plasma 5.22.5

The output of the inxi -Fazy command:

System:
  Kernel: 5.13.0-20-lowlatency x86_64 bits: 64 compiler: gcc v: 11.2.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.13.0-20-lowlatency 
  root=UUID=726a12dd-9d6a-4cdb-9186-ac454f33546f ro threadirqs quiet splash 
  vt.handoff=1 
  Desktop: KDE Plasma 5.22.5 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM 
  Distro: Ubuntu 21.10 (Impish Indri) 
Machine:
  Type: Laptop System: LENOVO product: 80TU v: Lenovo ideapad 310-14IKB 
  serial: <filter> Chassis: type: 10 v: Lenovo ideapad 310-14IKB 
  serial: <filter> 
  Mobo: LENOVO model: Torronto 4C2 v: NO DPK serial: <filter> UEFI: LENOVO 
  v: 3JCN21WW date: 09/23/2016 
Battery:
  ID-1: BAT0 charge: 21.0 Wh (100.0%) condition: 21.0/30.0 Wh (70.1%) 
  volts: 8.5 min: 7.4 model: SMP L15M2PB2 type: Li-poly serial: <filter> 
  status: Full 
CPU:
  Info: Dual Core model: Intel Core i7-7500U bits: 64 type: MT MCP 
  arch: Amber/Kaby Lake note: check family: 6 model-id: 8E (142) stepping: 9 
  microcode: EA cache: L2: 4 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 23199 
  Speed: 600 MHz min/max: 400/3500 MHz Core speeds (MHz): 1: 600 2: 618 3: 700 
  4: 623 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
  Type: l1tf 
  mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
  Type: meltdown mitigation: PTI 
  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: Full generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: conditional, RSB filling 
  Type: srbds mitigation: Microcode 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: Intel HD Graphics 620 vendor: Lenovo driver: i915 v: kernel 
  bus-ID: 00:02.0 chip-ID: 8086:5916 class-ID: 0300 
  Device-2: NVIDIA GM108M [GeForce 920MX] vendor: Lenovo driver: nvidia 
  v: 470.74 alternate: nvidiafb,nouveau,nvidia_drm bus-ID: 03:00.0 
  chip-ID: 10de:134f class-ID: 0302 
  Device-3: Chicony EasyCamera type: USB driver: uvcvideo bus-ID: 1-4:4 
  chip-ID: 04f2:b57d class-ID: 0e02 serial: <filter> 
  Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: 
  loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa display-ID: :0 
  screens: 1 
  Screen-1: 0 s-res: 3286x1080 s-dpi: 96 s-size: 867x285mm (34.1x11.2") 
  s-diag: 913mm (35.9") 
  Monitor-1: eDP-1 res: 1366x768 hz: 60 dpi: 112 size: 309x173mm (12.2x6.8") 
  diag: 354mm (13.9") 
  Monitor-2: DP-1 res: 1920x1080 hz: 60 dpi: 36 size: 1360x768mm (53.5x30.2") 
  diag: 1562mm (61.5") 
  OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.2.2 
  direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo 
  driver: snd_hda_intel v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3 
  chip-ID: 8086:9d71 class-ID: 0403 
  Sound Server-1: ALSA v: k5.13.0-20-lowlatency running: yes 
  Sound Server-2: JACK v: 1.9.19 running: no 
  Sound Server-3: PulseAudio v: 15.0 running: yes 
  Sound Server-4: PipeWire v: 0.3.32 running: yes 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Lenovo driver: r8169 v: kernel port: 4000 bus-ID: 01:00.0 
  chip-ID: 10ec:8168 class-ID: 0200 
  IF: enp1s0 state: down mac: <filter> 
  Device-2: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter 
  vendor: Lenovo driver: ath10k_pci v: kernel port: 4000 bus-ID: 02:00.0 
  chip-ID: 168c:0042 class-ID: 0280 
  IF: wlp2s0 state: up mac: <filter> 
Bluetooth:
  Device-1: Qualcomm Atheros type: USB driver: btusb v: 0.8 bus-ID: 1-7:6 
  chip-ID: 0cf3:e500 class-ID: e001 
  Report: hciconfig ID: hci0 rfk-id: 2 state: down bt-service: enabled,running 
  rfk-block: hardware: no software: yes address: <filter> 
  Info: acl-mtu: 1024:8 sco-mtu: 50:8 link-policy: rswitch hold sniff 
  link-mode: slave accept 
Drives:
  Local Storage: total: 372.62 GiB used: 243.56 GiB (65.4%) 
  ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SA400S37240G 
  size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s 
  type: SSD serial: <filter> rev: 0102 scheme: GPT 
  SMART Message: Unknown smartctl error. Unable to generate data. 
  ID-2: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST9160412AS 
  size: 149.05 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s 
  type: HDD rpm: 7200 serial: <filter> rev: HPM1 scheme: MBR 
  SMART Message: Unknown smartctl error. Unable to generate data. 
Partition:
  ID-1: / raw-size: 223.27 GiB size: 218.71 GiB (97.96%) 
  used: 145.27 GiB (66.4%) fs: ext4 block-size: 4096 B dev: /dev/sda2 
  maj-min: 8:2 
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) 
  used: 5.9 MiB (2.0%) fs: vfat block-size: 512 B dev: /dev/sda1 maj-min: 8:1
Mark Kirby avatar
cn flag
Is your second drive formatted in NTFS? https://askubuntu.com/questions/245154/how-to-get-permissions-to-execute-programs-from-ntfs-hard-drive
Young Fellow avatar
kr flag
No, ext4. But thanks for replying @Mark
vanadium avatar
cn flag
Add the output of `ls -l '/home/myms/Storage/04 ANDROID STUDIO/android-studio/bin/studio.sh'` to your answer.
kyodake avatar
ye flag
You can try with : sudo chmod -Rf 777 /dev/sdb1
Young Fellow avatar
kr flag
Thanks @kyodake, but it didn't work unfortunately. Wait a minute, do I need to reboot or unmount and mount after running a `chmod` command?
vanadium avatar
cn flag
@YoungFellow do not blindly follow random recommendations of commands, especially commands preceded by `sudo`, except if you like to reinstall your system now and then.
waltinator avatar
it flag
Could the 2nd drive be mounted with the `noexec` option? Look at `mount`. Read `man mount`. Explore your Mount/Read/Write/Execute problems with `https://github.com/waltinator/pathlld`, a `bash` script.
Young Fellow avatar
kr flag
Okay, so running `sudo mount /dev/sdb1 /home/myms/Storage --rw` worked for me, but how do I make sure I don't have to keep doing this every time I log in?
oemb1905 avatar
th flag
Add a proper entry in etc fstab
Young Fellow avatar
kr flag
And how do I do that?
Score:0
kr flag

Managed to solve the problem by setting the drive's line in fstab to:

/dev/disk/by-uuid/efc6bf95-a436-4d02-b544-6f9ca414ae9f /home/myms/Storage auto nosuid,nodev,nofail,x-gvfs-show 0 0

Thanks to @waltinator for telling me to do some reading ;)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.