How to Use Wrapper to Get Root Privilege for Scripts in Plesk Module
When you try to build a Plesk module you will come across number of doubts in that some of them are
How to Run a Shell Script or Binary as Root in Plesk Module?
How to use plesk wrapper to get root privilege for scripts?
How to use plesk wrapper from sbin?
What to do with “failed to open stream: Permission denied” in plesk module?

Its very difficult to get help on plesk module development. The tutorial provided by Parallels is really insufficient and incomplete. When I was trying to build a plesk module package, I faced many problems and googling never gave any solution too. After doing so much research I was able to develop a plesk module for my Client. I hope this post will be helpful for many who are trying to build plesk module and wanted root privilege to run a script in it.
Following is one of the methods which I used successfully in plesk 10.4. I hope it will work for all plesk versions.
Imagine you want to build a plesk module and that should have functionality to set ownership of configuration file to root:root or any other ownership. Also need to write in to /etc/passwd or any file which can be edited only with root permission. This functionality is not possible with simple php script like chown, or system functions. It is because, plesk modules runs under psaadm user privilege so it can’t change files which is under root privilege. But there is one solution for this which is provided in plesk i.e. plesk module wrappers. This can be used to get root privilege for some scripts. To achieve this, you can follow below procedure or steps.
Imagine you have a shell script [setperm.sh] which is used to set permission for all files related to your module. To execute this script with root privilege use following steps.
1) Place setperm.sh under “/usr/local/psa/admin/sbin” [don't forget this path is very important]
2) Create a symbolic link in “/usr/local/psa/admin/bin/modules/<ur-module-foldername>”. By executing
“ln -s /usr/local/psa/admin/sbin/wrapper /usr/local/psa/admin/bin/modules/<ur-module-foldername>/ setperm.sh”
3) You are done with wrapper; now you can use this script in any php file inside your module script and it will execute as root.
4) For example you can call this script like this
<?php
system(/usr/local/psa/admin/bin/modules/<ur-module-foldername>/ setperm.sh, $varout);
?>
5) You can create this symbolic link while building RPM itself.
So this is all about plesk wrapper usage to get root privilege for scripts under plesk module.
Must have Useful Android Apps

If you having an android phone it is sure that you will be searching for Must have and Useful Android Apps, good or best apps in android market and also best free android apps in market etc. I have spent two third of my time in searching, installing and testing android apps for my android phone for the past few months. So I have come to a conclusion on all the best apps and must have apps for android phones. I have listed all apps which you should have in your android phone. In this 16 out of 17 are Must have Useful free Android Apps.
By defaults all android phones having many Google applications like gtalk, gmail, etc.
1) Google Maps
Google Maps a Google Inc product, it really helps those who travel.
eBuddy Messenger helps, Stay always connected with all your friends and family on MSN Windows Live Messenger or WLM, Facebook, Yahoo, MySpace, Gtalk, Orkut, ICQ, AIM (AOL) and Hyves.
Barcode Scanner is must have application. This Scans barcodes on products then look up prices and reviews. You can also scan Data Matrix and QR Codes containing URLs, contact info, etc. Also share your contacts, apps, and bookmarks via QR Code.
You can also copy URL form you pc monitor if you have firefox with QR code add-on installed
Tiny Flashlight + LED is one of the very use full application. It supports the widest range of devices with camera led/flash torch.
Dolphin Browser HD is one of the best browser I found which support many add-on. Which is not that good in any other browsers, also nice design. Many customizations, themes etc.
6) Springpad
Springpad is a nice App which really helps to keep notes and also passwords protect etc
This is one of the very useful app which can be used to instant edit of images took in cam or stored in phone.
PicsIn Photo Studio is one of the amazing applications which are like image creator, wallpaper crater, paintbrush editor, image publisher to social network etc.
9) TubeMate: YouTube Downloader
TubeMate: YouTube Downloader is one of the nice application, this helps to search in youtube also helps to download videos we like in different resolution. Even this has supportive application to convert video to mp3 converter also.
10) GO Weather
GO Weather is nice weather application and it gives nice weather widgets also.
MixZing Media Player is nice Media player, compare to default media player this having many options and also nice 10 band equalizer too.
12) ES File Explorer
ES File Explorer is nice application. It is having multiple functionality like featured file manager with FTP and network and blue tooth, app manager with app backup and task killer etc, which explores PHONE and PC.
13) App 2 SD Free (move app to SD)
App 2 SD helps you to get more free internal phone storage space, also it notifies which are application you can move to SD card.
14) Android Assistant(14 features)
Android Assistant it having many features. It really helps to optimize your device by clearing cache monitoring CPU, memory, battery usage etc even it have an advance task killer.
AndroZip File Manager is an archive manager (ZIP, encrypted ZIP, RAR, TAR, GZIP, BZIP2, 7ZIP – BETA – under development), app backup, Task manager, search files, app installer, send files, app installer. Has multiple/batch move, copy, delete, create ZIP
Compare to all application I will strongly recommend JuiceDefender Plus to save battery usage. It really works grate but need to configure it nicely. You can customize many things in it. This app had a free copy earlier, but now it’s removed. Now you need to pay for it.
17) GO Launcher EX
This is one useful application. It gives very good flexibility for your android phone appearance. Many customizations, themes etc. You can change each and every part of your android phone looks also it have some nice widgets also. It is really awesome tool.


