[arch-general] File permissions with udisks/udisk2 mounts

Curtis Shimamoto sugar.and.scruffy at gmail.com
Thu Nov 22 16:44:30 EST 2012

On 11/22/12 at 05:00pm, Paul Marwick wrote:
> I tried asking this on the forum, didn't get any real answers, so
> I'm hoping someone here can help.
> I have a script located on a Vfat-formatted flash drive. When
> mounted using udisks, there are no execute permissions showing on
> the files, and they cannot be set.
> After some research, it seems that udisks works with polkit to set
> things like permission on mounted devices. Unfortunately, so far my
> attempts at research haven't led me to any information on setting
> permissions the way I need them, or even where the settings are
> stored. So I'm hoping someone can point me in the right direction -
> I want to be able to modify things like execute permissions on
> mounted devices when I need to. I'm not all that partial to being
> effectively told I can't do that - reminds me much too much of
> Windows.
> I've tried a few workarounds, with little or no success. I installed
> pmount and used it with the -e option to mount the device. Still no
> execute permissions. I tried using sh to execute the script - failed
> again.... I also tried adding the device to /etc/fstab. In that
> instance, the file showed as executable, but any attempt to execute
> it, even as root, got a 'permission denied' message.  Argh!
> Paul.

Have you tried manually mounting with something like:

# mount -o exec /dev/whatever /mount/point

I don't use udisks, but I use pmount and (I think) it automatically
mounts with the noexec option. I have never had a reason to try to get
around this, so I also cannot speak to whether or not working around it
is functional.

But I figure if you do it manually, and specify exec, if it still
doesn't work, then you at least then know that it is not specific to any
of these automounting functions you use.

Curtis Shimamoto
sugar.and.scruffy at gmail.com

More information about the arch-general mailing list