You are not logged in.

#1 2011-05-04 16:18:50

fulmare
Member
Registered: 2011-02-16
Posts: 25

Windows executable have directory permission in udev automount

Hi! I've used the arch wiki to set automount
https://wiki.archlinux.org/index.php/Ud … n-mounting
My rule looks like that:

KERNEL!="sd[a-z]*", GOTO="media_by_label_auto_mount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="media_by_label_auto_mount_end"

# Individua l'etichetta
PROGRAM=="/sbin/blkid -o value -s LABEL %N", ENV{dir_name}="%c"
# utilizza basename per to gestire etichette come ../mnt/foo
PROGRAM=="/usr/bin/basename '%E{dir_name}'", ENV{dir_name}="%c"
ENV{dir_name}=="", ENV{dir_name}="usbhd-%k"

ACTION=="add", ENV{dir_name}!="", RUN+="/bin/su tomk -c '/usr/bin/pmount -A -u 177 --dmask 066 %N %E{dir_name}'" 
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/su tomk -c '/usr/bin/pumount /media/%E{dir_name}'"
LABEL="media_by_label_auto_mount_end"

Directory are marked "executable" of course, all files but .exe are not. How can I change .exe permissions?

Offline

#2 2011-05-04 16:45:39

vinayv
Member
From: Bangalore, India
Registered: 2008-08-11
Posts: 89

Re: Windows executable have directory permission in udev automount

I actually have not configured UDev like you have mentioned.. But at times I have seen cases where files in windows partitions do not have any execute permissions.. It was always because the corresponding fstab entry had "noexec" flag.. I even got the problem a couple of times when "noexec" flag was not specified.. It always worked for me when I removed the "noexec" flag (if present) and added the "exec" flag to the fs entry in /etc/fstab
Maybe you can try the same

Offline

#3 2011-06-07 08:24:40

fulmare
Member
Registered: 2011-02-16
Posts: 25

Re: Windows executable have directory permission in udev automount

Scuse me for the delay,
I have no entry in /etc/fstab and I've tried to toggle the flag -e in the rule without results

ACTION=="add", ENV{dir_name}!="", RUN+="/bin/su tomk -c '/usr/bin/pmount -A -u 177 --dmask 066 %N %E{dir_name}'" 

ACTION=="add", ENV{dir_name}!="", RUN+="/bin/su tomk -c '/usr/bin/pmount -A -e -u 177 --dmask 066 %N %E{dir_name}'" 

Offline

#4 2011-06-07 15:07:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: Windows executable have directory permission in udev automount

Paraphrasing man pmount (which I know you read):

One of the pmount options is --exec.  You will note from the documentation that the default is noexec (recheck line 47 of the man output)

Edit: Okay, I see you are using the -e option.  Sorry.  Never-the-less, look further down the documentation and look at umask vs dmask and fmask


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2011-06-07 18:57:51

fulmare
Member
Registered: 2011-02-16
Posts: 25

Re: Windows executable have directory permission in udev automount

I've corrected "-u" with "--fmask"

ACTION=="add", ENV{dir_name}!="", RUN+="/bin/su tomk -c '/usr/bin/pmount -A --fmask 177 --dmask 066 %N %E{dir_name}'"

and nothing changed.
My problem is: new.txt has right permissions, new.exe no: it's executable.
Any help without useless sarcasm?

Offline

#6 2011-06-08 01:02:04

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: Windows executable have directory permission in udev automount

fulmare wrote:

Any help without useless sarcasm?

You are correct.  That came across with a lot more sarcasm and a lot less humor than I had planned.

Apologies.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB