Active Topics

 


Reply
Thread Tools
Posts: 2 | Thanked: 0 times | Joined on Aug 2007
#1
Hi all,

I have Nokia N800 with os2007. I'd like to be able execute programs and scripts directly from a memory card. So I've changed flag noexec to exec in /etc/fstab, but when I mount card again, it is mounted with noexec flag (/etc/mtab tells it, and I can execute nothing). Is it some kind of feature, or I am doing it wrong way?
 
Posts: 11 | Thanked: 12 times | Joined on Sep 2007
#2
Was searching for this today, and found where they're setting the mount options.

How to change mmc mount options

Obligatory Disclaimer
This info is provided to give you choices. There is an elevated security risk in allowing programs to be run from a card that any computer that is usb-connected to the N800 can freely write to.

Prerequisites:
* Have the ability to use root command-line access (see How do I become root 2 to configure this)
* Can run a text editor as root (nano, vim, ???)

Information:
The media cards are mounted by a script called mmc-mount, which is located with the system executables. This script is responsible for the actual mount command used when mounting both the internal and external media cards. It contains a single command that sets the mount options - including the noexec flag that prevents running commands from the media card.

Steps to enable exec:
1. Open a terminal window & become root.
2. cd /usr/sbin
3. cp mmc-mount mmc-mount.orig
(so you have a back-up just in case)
4. <edit> mmc-mount
and remove the "noexec," part from the command
5. Save, exit the editor, & reboot the machine.

From now on, you will be able to run commands from both media cards, provided they are not 'suid'. It's possible to allow suid commands to run as well - but given the fact that any computer that you plug a usb cable into gets full write access to these cards, I'd be very dubious about allowing a program that can escalate privilages to be run from them!

Have fun!

Last edited by Dawnmist; 2007-10-05 at 13:18. Reason: formatting
 

The Following 4 Users Say Thank You to Dawnmist For This Useful Post:
Posts: 2 | Thanked: 0 times | Joined on Aug 2007
#3
Great. Thanks!!!
 
Posts: 271 | Thanked: 107 times | Joined on May 2008 @ Georgia
#4
Originally Posted by Dawnmist View Post
Was searching for this today, and found where they're setting the mount options.

How to change mmc mount options

Obligatory Disclaimer
This info is provided to give you choices. There is an elevated security risk in allowing programs to be run from a card that any computer that is usb-connected to the N800 can freely write to.

Prerequisites:
* Have the ability to use root command-line access (see How do I become root 2 to configure this)
* Can run a text editor as root (nano, vim, ???)

Information:
The media cards are mounted by a script called mmc-mount, which is located with the system executables. This script is responsible for the actual mount command used when mounting both the internal and external media cards. It contains a single command that sets the mount options - including the noexec flag that prevents running commands from the media card.

Steps to enable exec:
1. Open a terminal window & become root.
2. cd /usr/sbin
3. cp mmc-mount mmc-mount.orig
(so you have a back-up just in case)
4. <edit> mmc-mount
and remove the "noexec," part from the command
5. Save, exit the editor, & reboot the machine.

From now on, you will be able to run commands from both media cards, provided they are not 'suid'. It's possible to allow suid commands to run as well - but given the fact that any computer that you plug a usb cable into gets full write access to these cards, I'd be very dubious about allowing a program that can escalate privilages to be run from them!

Have fun!


ok i did this, and tried to install a app to my int memory.
didn't work:

here is what happen when i tried install a app>>
sudo apt-get install advanced-power-0.3.4-2_all.deb
>dpkg-deb -c "/media/mmc3/opt/advanced-power-0.3.4-2_all.deb" (1875)
drwxr-xr-x 0/0 0 2008-12-03 20:45:50 ./
drwxr-xr-x 0/0 0 2008-11-24 19:25:44 var/
drwxr-xr-x 0/0 0 2008-12-20 16:36:04 var/lib/
drwxr-xr-x 0/0 0 2008-11-24 19:26:00 var/lib/gconf/
drwxr-xr-x 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/
drwxr-xr-x 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/
-rwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/settings/
-rwxrwxrwx 0/0 603 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/settings/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/translators/
-rwxrwxrwx 0/0 184 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/translators/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/
-rwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/timeleft-active/
-rwxrwxrwx 0/0 351 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/timeleft-active/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/buttons-emulation/
-rwxrwxrwx 0/0 350 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/buttons-emulation/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/device-mode/
-rwxrwxrwx 0/0 352 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/device-mode/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/version/
-rwxrwxrwx 0/0 350 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/version/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/battery-status/
-rwxrwxrwx 0/0 347 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/battery-status/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/cpu-policy/
-rwxrwxrwx 0/0 351 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/cpu-policy/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/timeleft-idle/
-rwxrwxrwx 0/0 349 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/timeleft-idle/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/free-disk/
-rwxrwxrwx 0/0 350 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/free-disk/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/free-swap/
-rwxrwxrwx 0/0 344 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/free-swap/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/free-ram/
-rwxrwxrwx 0/0 343 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/free-ram/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/temperature/
-rwxrwxrwx 0/0 351 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/temperature/%gconf.xml
drwxrwxrwx 0/0 0 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/uptime/
-rwxrwxrwx 0/0 346 2008-12-25 21:00:29 var/lib/gconf/apps/advanced-power/plugins/uptime/%gconf.xml
drwxr-xr-x 0/0 0 2008-11-11 19:21:48 usr/
drwxr-xr-x 0/0 0 2008-11-11 19:16:52 usr/lib/
drwxr-xr-x 0/0 0 2008-12-27 20:42:06 usr/lib/hildon-desktop/
-rw-r--r-- 0/0 45908 2008-12-27 20:42:06 usr/lib/hildon-desktop/advanced-power.py
drwxr-xr-x 0/0 0 2008-12-20 18:10:12 usr/share/
drwxr-xr-x 0/0 0 2008-12-20 18:10:22 usr/share/icons/
drwxr-xr-x 0/0 0 2008-12-20 18:44:56 usr/share/icons/hicolor/
drwxr-xr-x 0/0 0 2008-12-20 18:10:58 usr/share/icons/hicolor/26x26/
drwxr-xr-x 0/0 0 2008-12-20 18:14:32 usr/share/icons/hicolor/26x26/hildon/
-rw-r--r-- 0/0 3312 2008-12-20 18:45:38 usr/share/icons/hicolor/26x26/hildon/advanced-power.png
drwxr-xr-x 0/0 0 2008-12-02 23:45:58 usr/share/advanced-power/
drwxr-xr-x 0/0 0 2008-12-06 14:30:38 usr/share/advanced-power/themes/
drwxr-xr-x 0/0 0 2008-12-02 23:48:50 usr/share/advanced-power/themes/Default/
drwxr-xr-x 0/0 0 2008-12-08 08:53:18 usr/share/advanced-power/themes/Default/images/
-rw-r--r-- 0/0 3940 2008-12-08 08:49:48 usr/share/advanced-power/themes/Default/images/battery_charging.png
-rw-r--r-- 0/0 3131 2008-12-08 08:48:10 usr/share/advanced-power/themes/Default/images/battery_low.png
-rw-r--r-- 0/0 3484 2008-12-08 08:47:28 usr/share/advanced-power/themes/Default/images/battery_verylow.png
-rw-r--r-- 0/0 3179 2008-12-08 08:46:06 usr/share/advanced-power/themes/Default/images/battery_100.png
-rw-r--r-- 0/0 3146 2008-12-08 08:45:04 usr/share/advanced-power/themes/Default/images/battery_25.png
-rw-r--r-- 0/0 3166 2008-12-08 08:45:30 usr/share/advanced-power/themes/Default/images/battery_50.png
-rw-r--r-- 0/0 3171 2008-12-08 08:45:48 usr/share/advanced-power/themes/Default/images/battery_75.png
drwxr-xr-x 0/0 0 2008-12-02 23:55:58 usr/share/advanced-power/themes/Default/sounds/
-rw-r--r-- 0/0 27756 2007-06-07 13:16:02 usr/share/advanced-power/themes/Default/sounds/battery_charging.wav
-rw-r--r-- 0/0 113512 2007-06-07 13:16:02 usr/share/advanced-power/themes/Default/sounds/battery_low.wav
-rw-r--r-- 0/0 123748 2007-06-07 13:16:02 usr/share/advanced-power/themes/Default/sounds/battery_verylow.wav
drwxr-xr-x 0/0 0 2008-12-02 15:47:10 usr/share/locale/
drwxr-xr-x 0/0 0 2008-12-02 15:47:20 usr/share/locale/ru_RU/
drwxr-xr-x 0/0 0 2008-12-25 19:54:23 usr/share/locale/ru_RU/LC_MESSAGES/
-rw-r--r-- 0/0 3446 2008-12-25 19:49:50 usr/share/locale/ru_RU/LC_MESSAGES/advanced-power.mo
drwxr-xr-x 0/0 0 2008-11-11 19:19:14 usr/share/applications/
drwxr-xr-x 0/0 0 2008-12-20 18:11:58 usr/share/applications/hildon-status-bar/
-rw-r--r-- 0/0 109 2008-12-20 18:11:58 usr/share/applications/hildon-status-bar/advanced-power.desktop
>dpkg-deb -c "/media/mmc3/opt/advanced-power-0.3.4-2_all.deb" (1875) returned '0'


HELP Please....................
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:35.