473,385 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

safe mode activated: functions permitted or not ?

Hi all

I need to know, whether or not any or all of those functions, are
being permitted when safe mode is 'On', and the uid/gid of the current
directory, is not the same as uid/gid of the executing php script (
apache/apache as module, no suexec )

Indeed, the current directory has permissions setup such there
shouldn't be any permission error, from a unix/linux point of view. (
Linux/Apache/MySQL server ), i.e.: -rwx---rwx

For any of those functions, may I be allowed to ask for you, to say
me whether the functions above either are permitted, or not:

touch($filename);
$fp = opendir('.');
readdir($gp);
closedir($fp);

And also:

unlink($filename); // ( in the case the uid/gid of the file is the
same as the script's one ( apache/apache ), *and* the uid/gid of the
current directory is not the same. )

In the PHP Manual web site, none of the directory functions appear to
be restricted, however the list is not exhaustive.

For the touch() function, I think I've a doubt, for there's a comment
from a developer on the PHP Manual site, saying this function touch() is
allowed as well, under those conditions.

As for the unlink() function, that's not clear for me, if the uid/gid
to be considered, is either the file's one, or the uid/gid of the
current directory.

Many thanks for all your responses !

Thank you very much.

Best regards.

Jean-Francois Ortolo
Jan 24 '06 #1
0 1143

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JaazzMan | last post by:
hello!, I'm devoloping a web gallery in php. The user may upload images for every news posted. Every news has a internal number that references a folder with the same name that the new. The folder...
1
by: Giobibo | last post by:
Hi. I want to send mail with the function mail(). I am on a shared server in SAFE MODE. When I send a mail I get the message: "SAFE MODE Restriction in effect. The fifth parameter is...
0
by: Yemi | last post by:
Hi There. I seem to be getting some inconsistent results when using passthru() in safe mode. They appear to be related to the fact that passthru should treat all command arguments as one single...
2
by: Paul Schmidinger | last post by:
Hi, I created a directory with PHP mkdir (mode 0777). Then I try to move_ulpoaded_file() to move a file into this directory. I get an error: Warning: move_uploaded_file(): SAFE MODE...
5
by: Simon Elliott | last post by:
I'd like to do something along these lines: struct foo { int i1_; int i2_; }; struct bar {
2
by: Joseph S. | last post by:
Hi all, Consider this case: I have a free php hosting account (a LAMP host) with an account name (also the name of my directory) 'sample'. Under 'sample', I have php scripts which can create...
1
by: goldtech | last post by:
Is there a way to create thumnails with a script in PHP with safe mode ON? We want to keep safe mode ON for our server but beable to automatically create thumbs from full size image files. Is...
7
by: bvdp | last post by:
Is there a simple/safe expression evaluator I can use in a python program. I just want to pass along a string in the form "1 + 44 / 3" or perhaps "1 + (-4.3*5)" and get a numeric result. I can...
7
by: bvdp | last post by:
I'm finding my quest for a safe eval() quite frustrating :) Any comments on this: Just forget about getting python to do this and, instead, grab my set of values (from a user supplied text file)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.