root

Admin privileges for script

Hello, how can i check admin-privileges for my script during running? ...

Which files shoud only be at Root?

My Mac saves my Vim's temporary files, my Scanner's log files and mach_kernel -files to my Root. I did not set this procedure up. I am at the moment removing files at my root, since many of them seem to be just swap files. I have the idea that only folders and system's symlinks should be at root. Which files should only be at Root? ...

SU command issue Android device

Hi i want to change the folder permissions on device but when i type su i get permission denied is there any other way to do the same ..... ...

Run a Python project in Eclipse as root

Hi, I use Eclipse as my IDE, and when I run my application I wish the application itself to run as root. My program currently checks if it is root, and if not it restarts itself with gksudo. The output, however, isn't written to the console. I can't use sudo, since it doesn't give me a graphical prompt. (While my program is CLI, Eclipse...

Debugging in XCode as root

In my program I need to create sockets and bind them to listen HTTP port (80). The program works fine when I launch it from command line with sudo, escalating permissions to root. Running under XCode gives a 'permission denied' error on the call to binding function (asio::ip::tcp::acceptor::bind()). How can I do debugging under XCode? ...

Implementing a dired interface in emacs for something other than the filesystem?

The ROOT data analysis framework commonly used in high energy physics uses a binary file format that has internal structure like a real filesystem (i.e. folder & files). The ls() method output from the program look something like this: KEY: TH1D name1 KEY: TH1D name2 KEY: TH2D name3 .... Where "TH1D" and "TH2D" etc. ...

Allowing PHP to change file and directory ownership and permission

Hi, I'd like to build a simple web app, which manages some directory on a server. I want to give people the option to use chown and chmod. What is the safest way to give PHP this permission? The quickest thing is just running Apache and PHP as root, but that doesn't seem to be a smart idea. One other thing I thought of, was creating a...

Determine if running on a rooted device

My app has a certain piece of functionality that will only work on a device where root is available. Rather than having this feature fail when it is used (and then show an appropriate error message to the user), I'd prefer an ability to silently check if root is available first, and if not,hide the respective options in the first place. ...

Ubuntu: allow non-root user to create and impersonate users

I want to write a server that receives and executes code on behalf of non-trusted parties. In order to make this more secure I want the code to be run as a user that is created exclusively for running this code and then deleted. How can I grant a non-root user the permission to create, impersonate and remove other users? ...

PHP - editing text file above root

Hi , I'm using PHP & i wanted to put a text file above(outside) the website root so users can't access it. But i wanted to know how can i read it from my code, i want to open, write/edit some data then save it. Please give me an example. Thanks , ...

NHibernate - how to map collection of trees

Hi, I want map my object model to NHibernate. There is one tricky part in my concept and I don't know if it is possible to do this in NHibernate. I want to have a collection of trees. I have two classes (below, only important properties indicated). Component is a node of a tree and ComponentGroup is a collection of trees. public class...

XML Serialization of List<T> - XML Root

First question on Stackoverflow (.Net 2.0): So I am trying to return an XML of a List with the following: public XmlDocument GetEntityXml() { StringWriter stringWriter = new StringWriter(); XmlDocument xmlDoc = new XmlDocument(); XmlTextWriter xmlWriter = new XmlTextWriter(stringWriter);...

Test for root node XML .NET

I'm currently using the code below to attempt to check for a certain root node (rss) and a certain namespace\prefix (itunes), but it seems to be saying that the feed is valid even when supplied with a random web page URL instead of one pointing to a feed. FeedState state = FeedState.Invalid; XmlDocument xDoc = new XmlDocument(); xDoc.L...

phpMyAdmin - can't connect - invalid setings - ever since I added a root password - locked out

I run XAMPP, a few days back i had set up a password for the root password through phpmyadmin I am not able to access phpMyAdmin ever since that moment I followed help on this link but everything seems fine there (in config.inc.php). I even tried unistalling xampp fully, restarting windows and then reinstalling xampp, but still pointing...

php header() above document root

I am trying to user header() to direct to a page above the document root. I'm running XAMPP so I'm trying to call a script above htdocs. My problem is it gives me the 404 error and can't find the document. My question: can you use header() to call a script above the document root or is it better to use an include() to accomplish this?...

Deploying rails application to root with passenger error

Hi guys, I am trying to deploy my rails application to virtual host's root with passenger but I had some problems. Error log: [Sun Aug 23 10:09:06 2009] [error] [client 91.187.5.190] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. ...

How do I run a command as a different user from a root cronjob?

I seem to be stuck between an NFS limitation and a Cron limitation. So I've got root cron (on RHEL5) running a shell script that, among other things, needs to rsync some files over an NFS mount. And the files on the NFS mount are owned by the apache user with mode 700, so only the apache user can run the rsync command -- running as root...

PHP File Directory - $_SERVER['DOCUMENT_ROOT']'s parent folder

I know $_SERVER['DOCUMENT_ROOT'] returns the document root (most likely something like /home/user/public_html), but is there any way to get the parent directory of this folder? (i.e. just /home/user/) I would try and replace common folder names like public_html or www, but it's not a given that the folder would be named that on all syst...

Require the user to enter the server's superuser/root password in PHP.

Hi all! I'm making a system called NCIV in PHP. In that system you can change a setting in settings.php, which allows the system's admin to enable or disable the usage of MySQL rather then a bunch of text files. However, changing that setting if the site already has content, will move all the data from/to the MySQL Database to/from the ...

root path doesnt work with php include .

Hi. / in the beginning of a link to get to the root folder doesnt work in php include. for example "/example/example.php" What is the solution? ...