root

Keeping my Java program secure

I have a Java project that uses the Bluecove Library, this library requires root privileges to do certain actions that I require in my project. I should note here that despite the project being Java based it is for Linux only. The project will have many functions that do not require root privileges, some of which will have to interact w...

.htcaccess redirect ONLY root ("/") to sub folder

I have a site that is arranged thus: /about /css/ /index/index.php /js/ /index.php index.php uses a PHP redirect to index/index.php I want to create a .htaccess rewrite rule so that when the root is accessed, /index/index.php is displayed BUT /about etc. stays the same. ...

Flash iTunes Cover Flow replace root command in flash

hey, i want to use the itunes cover flow but i have a problem with my flash, on the server i use, i cant use the root comand or actionscript 3, so i basicaly found what i needed in as2 but it has the command root in it and because of that, the flash cant load on the server, could anyone help me by telling me what should i do to get the r...

Problem with AsyncTask on rooted Droid

Hi I've got a widget on the Android market called DigiClock widget, and after the last update i've been having some extremely rare and random problems on rooted Motorola Droids ( there may be other handsets with the problem, but the only responses i've had are from rooted droid users ). The problem occurs when an activity is launched th...

PHP: How to run readdir() as root

I am trying to make a lightweight frontend for my fileserver. I use PHP to display all the files, but readdir() is executed as the http user, because apache is started as this user. This is a problem, because I want to view all my files. Therefore, readdir() has to be run as root, but I don't know how to do that. Can you guys help me? ...

how to use setuid() from root to become user, with the possiblity of becoming root again later ?

Hello all, I'm trying to do the safe thing, and have a program that needs to runs as root to drop its privileges when it doesn't need them. This works well if I chmod my binary with the SUID bit, and make it belong to root, as now I have UID = some user, and EUID = root, so I can use seteuid(0) and seteuid(getuid()) to respectively rais...

Restrict PHP access to root folders?

Im making sort of a service where people can upload PHP files and they get their own directory. Is there a way to prevent any way the PHP can access the root of the server? and just stay in the bounderies of its folder? ...

jaxb namespaces in each element instead of root element during marshalling

By default, jaxb 2 lists all (all possible required) namespaces in root element during marshalling: <rootElement xmlns="default_ns" xmlns:ns1="ns1" xmlns:ns2="ns2"> <ns1:element/> </rootElement> Is there a way to describe namespace in each element instead of root element ?: <rootElement xmlns="default_ns"> <...

Authenticating GTK app to run with root permissions

I have a UI app (uses GTK) for Linux that requires to be run as root (it reads and writes /dev/sd*). Instead of requiring the user to open a root shell or use "sudo" manually every time when he launches my app, I wonder if the app can use some OS-provided API to get root permissions. (Note: gtk app's can't use "setuid" mode, so that's n...

How to access codeigniter files from one directory to another different directory

I have XAMP installation, with htdocs in D drive. I copied Codeigniter/System folder to E drive. Now when i type http://localhost, i should able to access E:/Codeigniter/System/index.php How can i achieve this. ...

How to programmatically gain root privileges ?

I am writing some software (in C++, for Linux/Mac OSX) which runs as a non-privileged user but needs root privileges at some point (to create a new virtual device). Running this program as root is not a option (mainly for security issues) and I need to know the identity (uid) of the "real" user. Is there a way to mimic the "sudo" comma...

Positiong loaded object based on root stage instead of MC that is loaded from root.

I have a root stage, and a MC that is called from the root stage.Now from that MC, i will called in another MC2, and I wanted to placed the MC in the center of the stage. The reason I could not use normal ADDED_TO_STAGE at MC and define the center is because MC is not place in the exact position of the root stage (as in x, y=0). So if I ...

SVN best practice - checking out root folder

Hi all, quick question about svn checkout best practice. Once the structure of a repository is set up, ie trunk, branches, tags, is it normal to have the root checked out to our local machines. Or should you only check out the trunk if that's what you are working on or a branch if we so choose to create one. The reason i ask is that ev...

Getting content from PHP: Trouble with POST and query.

Apologies for my longest question on SO ever. I'm trying to interface with a php frontend for a mysql database in ROOT (a CERN framework in C++ for high energy physics analysis). To start off with, I tried to get this php interface to play nice with wget and curl first because I'm more familiar with them. The following command works: wg...

How to use rvm (ruby version manager) with root account?

The whole point of rvm is to be able to install multiple rubies and access them from a user account. What do you do when you need to access any of those rubies from root? Or use gems installed in one of those rvms? Is there an elegant (or even hackish) way to use these I haven't considered? My guess is that I should just add it to my P...

html/php: how to handle absolute url's?

Is the html <base> tag safe to use in terms of browser support? Or should I generate a root path with PHP which i then add like this <a href="<?=BASE?>somepage.html">somepage</a> which makes up a absolute url. using the base tag like this <base href="<?=BASE?>" /> I am then able to use links like this <a href="somepage.html">somepage<...

Dropping Root Permissions In Python

I'd like to have a Python program start listening on port 80, but after that execute without root permissions. Is there a way to drop root or to get port 80 without it? ...

Equivalent of running $_SERVER['DOCUMENT_ROOT'] when running php in terminal

Hey all, I was wondering if there is some variable that will return what $_SERVER['DOCUMENT_ROOT'] returns when I call PHP like this: ./somescript If not, how do people get around this case? I'm looking to be able to call the same script (a template compiler) in both the web browser and the terminal. Thanks! Matt Mueller ...

Display all images from outside web root folder using PHP

Hello, I want to display all images that are stored outside my web root folder. Please help me. I am only able to display one image repeatedly. For example, if I have 5 images in my folder, only one image is displayed on my browser 5 times. Please help me on this. I've been working on this problem for over a month now. I'm a newbie. Hel...

Does Developing Android Applications require a Rooted Device?

I am looking generally in to Android development. I keep seeing information on root however I am unclear how this relates to general android app development. I understand that there is an emulator however when I get to actually test the software on a phone does that phone have to be a rooted device or is this only required if you wish ...