I am trying to mount an iso using udisksctl and it appears that the bash scripts inside these are having only read permission

[root@hostname ~]# udisksctl loop-setup -r -f /root/test.iso
Mapped file /root/test.iso as /dev/loop0.

[root@hostname ~]# udisksctl mount -b /dev/loop0
Mounted /dev/loop0 at /media/20190701_130215.

[root@hostname ~]# ll /media/20190701_130215/ISO-002/
total 29
-r--------. 1 root root 20504 Jun 20 07:53 install_patch.sh`

But if I mount using mount -o loop the permissions are preserverd.

[root@hostname ~]# mount -o loop /root/test.iso /media/
mount: /dev/loop2 is write-protected, mounting read-only

[root@hostname ~]# ll /media/ISO-002/
total 29
-r-xr-xr-x. 1 root root 20504 Jun 20 07:53 install_patch.sh

I need to execute this script after using and wish to use udisksctl insted of mount -o loop due to some company restrictions.

Why it is behaving like this?

Is it possible to hack this behaviour and have execute permission with udisksctl command?

The system I am running is in kernel 3.10.0-862.14.4.el7.x86_64 and RHEL.


More Info: The iso mentioned above was created using UltraISO from Windows machine. I tried using mk_iso utility from Linux to create iso and everything seems fine.

  • Check /proc/self/mountinfo udisk might mount the device using different options. Or they set different option when creating loop device Jul 5, 2019 at 9:18


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.