You are not logged in.

#1 2014-06-13 20:47:26

Kotrfa
Member
Registered: 2012-10-25
Posts: 213

[SOLVED]devmon - how to mount without "noexec" flag

EDIT: Solution is in the last post.

Hello,

I'm using devmon and now I'd like to execute simple bash script on my harddisk. But unfortunately, devmon is mounting this disc as this:

devmon: /usr/bin/udevil --mount /dev/sdb1 --mount-options "noexec,nosuid,nodev,noatime"    # (extq)
Mounted /dev/sdb1 at /media/extq

when I try

$ devmon --mount /dev/sdb1 --mount-options "exec"

devmon: /usr/bin/udevil --mount /dev/sdb1 --mount-options "exec"    # (extq)
udevil: denied 90: option 'exec' is not an allowed option
devmon: error mounting /dev/sdb1 (2)

Can you please tell me what I'm doing wrong?

Thank you very much

Last edited by Kotrfa (2014-06-14 09:17:07)

Offline

#2 2014-06-13 20:56:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]devmon - how to mount without "noexec" flag

Have you tried

devmon --mount /dev/sdb1 --mount-options "nosuid,nodev,noatime"

Last edited by karol (2014-06-13 20:58:17)

Offline

#3 2014-06-13 21:04:33

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED]devmon - how to mount without "noexec" flag

Look into the allowed_options section in the udevil config file. Mounting anything with 'exec' is probably forbidden by default for security reasons.

Last edited by alphaniner (2014-06-13 21:05:32)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2014-06-14 09:16:40

Kotrfa
Member
Registered: 2012-10-25
Posts: 213

Re: [SOLVED]devmon - how to mount without "noexec" flag

karol wrote:

Have you tried

devmon --mount /dev/sdb1 --mount-options "nosuid,nodev,noatime"

Yes, I did and disc is mounted, but with "noexec" flag.

/dev/sdb1 on /media/extq type ext4 (rw,nosuid,nodev,noexec,noatime,data=ordered)

@Alphaniner: I looked in /etc/udevil/udevil.conf and there are default options, which I'd like to store - noexec option is of course one of them and it's because of security reasons. Anyway, thanks to alphaniner I searched this file a bit and there are also "allowed options", where I just added "exec" and it works. Hence solution:

Solution:
add "exec" option to /etc/udevil/udevil.conf to "allowed options":

allowed_options           = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID, ro, rw, sync, flush, iocharset=*, utf8, remount, exec

Offline

Board footer

Powered by FluxBB