Execution of Auto-mounted Files, How?

I edit /etc/fstab - and all works well…

But this is a drive that will be regularly unplugged and plunged back in, so I want it to auto mount.
In Ubuntu I just changed some system settings in the GUI and all inserted USB drives got exec priv.

But the “etc/sysconfig Editor” did not do the trick in SUSE, neither “Expert Partitioner” (Actualy only changes /etc/fstab for this task).
So then I added the new line to “/usr/share/hal/fdi/policy/10osvendor/21-storage-ntfs-3g.fdi”
<append key=“volume.policy.mount_option” type=“strlist”>exec</append>
to the section <match key=“volume.fstype” string=“ntfs”>

any other Ideas?
I will reboot and let you know if this last one worked…

Thanks

First time on SUSE forms, any “other” advice would be appreciated.:wink:

Ask the question before you blugger things up.

Is this a external USB HD?
What version of SUSE and what Desktop?

My goal is to have an auto-mounted drive “VFAT”(assuming) with Execution Privileges given to some user.
Yes this is a Portable USB Drive, On SUSE 12.2, XFCE(I like the Old feel of it)

Want to keep this short and to the point…
As a result of my last attempt, not working, I will try as many methods as possible to get this drive to auto-mount while in “root” and not rebooting my system.

I have a WD external USB plugged in - mostly permanently and it doesn’t automount, but I have a Label on the partition so it’s easy to see in my KDE file system.
Even though it’s not mounted it has a entry in kde’s places in Dolphin. If I click it, it mounts to /media

Now if you edit fstab to have the device mount at boot, it seems a bit crazy.

In kde the system settings > removable devices has an option to auto mount

But you didn’t say which desktop you are using

OK
So you either edited the post or I missed XFCE

Don’t they just automount? I thought they did…

What the heck does this mean:

get this drive to auto-mount while in “root”

So then I added the new line to “/usr/share/hal/fdi/policy/10osvendor/21-storage-ntfs-3g.fdi”
<append key=“volume.policy.mount_option” type=“strlist”>exec</append>
to the section <match key=“volume.fstype” string=“ntfs”>

I’m open to correction here, but HAL is no longer used with recent desktops, so I wouldn’t expect the above to work. (Maybe XFCE is an exception?)

you are right they do automount.
However I need it to automount in such a way as to give some user Execution Privileges.
Using my current knowledge, Execution Privileges can only be given to (vfat)drives mounted with etc/fstab.
Recap=> Automount>USB>vfat>Execution Privileges (exec) or just 777 or 007 or 700 W/E

I’ll try not to do live edits any more while you are still online. sorry.

Thanks for the info, that saves me a lot of testing…:shame:

Give the device partition a label – eg: myusb
That way when it mounts in /media
it will be /media/myusb

now you can do as su

chown -R luke490 myusb

*where luke490 is your user login

Update…
An attempt at changing the current Runlevel Settings to permit Autofs (the automount)
gives this error:
/etc/init.d/autofs start returned 1 (unspecified error):
so parhaps it is the GUI that is auto mounting my drive improperly…

Yes, udev and DE are responsible for handling/mounting.

It should be possible to construct a udev rule for recognising your usb storage media (with unique attributes) and assigning group ownership from there.

so close… If I make a directory called myusb in /run/media/luke490 then give chmod 770 myusb
it appears to work but once replugged in it creates a new folder myusb1…:\

You don’t need to create it. Delete it.
Use the volume label and when it mounts it will do it all for you

A while back I had already made some rule, but had no clue what it would do…
in /etc/udev/rules.d
90-usb-disks.rules
"
#Rules to change the permission of USB disks
KERNEL==“sd*[0-9]”, ATTR{removable}==“1”, ENV{ID_BUS}==“usb”, MODE=“002”
"
now I wonder why it does nothing?:frowning:

just noticed … MODE=“777” … that is not a mask

How does one chown/chmod a volume label that has not yet been mounted?

Give the device a volume label
Insert it and it should mount to /media/myusb
assuming it’s called myusb

then do

su -
cd /media
chown -R luke490 myusb

Hope I didn’t miss anything

The ownership is properly defined with 4 digits, so for example MODE=“0660”

For reference, I have an external USB HDD that I use. It has a the volume label ‘backup’ assigned, I match it with the following rule (and create the /media/backup symlink)

 SUBSYSTEM=="block",  ATTRS{subsystem_device}=="0x0566", ENV{ID_FS_LABEL}=="backup", SYMLINK+="backup"

If I wanted to assign root ownership and ‘users’ group, I could modify it like this

SUBSYSTEM=="block",  ATTRS{subsystem_device}=="0x0566", ENV{ID_FS_LABEL}=="backup", SYMLINK+="backup", OWNER:="root", GROUP:="users",MODE:="0660"