I think it's more likely that a security flaw might be found which
allows code other than yours to run. Buffer overflows were notorious
for this, as they had the side-effect of running whatever ran
outside of their buffer range, so you could in effect get a system
with an overflow hole to r
On Sun, 2010-06-06 at 14:08 -0400, tedd wrote:
> At 1:02 AM +0100 6/6/10, Ashley Sheridan wrote:
> >>On Sat, 2010-06-05 at 18:55 -0400, tedd wrote:
> >>
> >>Hi gang:
> >>
> >>Never-mind.
> >>
> >>I didn't change the parent directory permissions to unlink the file -- duh!
> >>
> >>tedd
> >
> >I was
At 1:02 AM +0100 6/6/10, Ashley Sheridan wrote:
On Sat, 2010-06-05 at 18:55 -0400, tedd wrote:
Hi gang:
Never-mind.
I didn't change the parent directory permissions to unlink the file -- duh!
tedd
I was just about to mention this! It's one of the bizarre security
loopholes in Linux. If you
On Sat, 2010-06-05 at 18:55 -0400, tedd wrote:
> Hi gang:
>
> Never-mind.
>
> I didn't change the parent directory permissions to unlink the file -- duh!
>
> Cheers,
>
> tedd
>
> --- I asked:
>
> Hi gang:
>
> I use unlink() to delete files on my server by using the statement:
>
> unlink($f
Hi gang:
Never-mind.
I didn't change the parent directory permissions to unlink the file -- duh!
Cheers,
tedd
--- I asked:
Hi gang:
I use unlink() to delete files on my server by using the statement:
unlink($filename);
where $filename is the physical path to the file plus file name, such
On 5 June 2010 23:45, tedd wrote:
> Hi gang:
>
> I use unlink() to delete files on my server by using the statement:
>
> unlink($filename);
>
> where $filename is the physical path to the file plus file name, such as:
>
> $filename = '/var/www/vhosts/domain.com/httpdocs/a-dir/a-text.txt';
>
> Now,
Hi gang:
I use unlink() to delete files on my server by using the statement:
unlink($filename);
where $filename is the physical path to the file plus file name, such as:
$filename = '/var/www/vhosts/domain.com/httpdocs/a-dir/a-text.txt';
Now, I can read, write, and even create the file -- so
Hi there,
I am trying to unlink a file which is inside a folder that is not
writable to phps user "www". Of course this failes, but I need to find a
solution for it.
Backgroud is following:
I have pure-ftpd installed where user directories get created by
pure-ftpd. Unfortunatelly there seems
On Wed, 2009-01-14 at 07:48 -0500, Alice Wei wrote:
>
> > Subject: RE: [PHP] PHP unlink Permission Error
> > From: a...@ashleysheridan.co.uk
> > To: aj...@alumni.iu.edu
> > CC: php-general@lists.php.net
> > Date: Tue, 13 Jan 2009 17:07:34 +
> >
>
> Subject: RE: [PHP] PHP unlink Permission Error> From:
> a...@ashleysheridan.co.uk> To: aj...@alumni.iu.edu> CC:
> php-general@lists.php.net> Date: Tue, 13 Jan 2009 17:07:34 +> > On Tue,
> 2009-01-13 at 11:49 -0500, Alice Wei wrote:> > > >
Alice,
I see that you are using windows. For windows only the write permission for
the folder and file isn't enough. You need to change the owner ship of the
file as well so that u have privilege to delete.
Do this , this might work:
//Change the owner ship of the file to a non existent user in t
On Tue, 2009-01-13 at 11:49 -0500, Alice Wei wrote:
>
>
>
> > Subject: RE: [PHP] PHP unlink Permission Error
> > From: a...@ashleysheridan.co.uk
> > To: aj...@alumni.iu.edu
> > CC: php-general@lists.php.net
> > Date: Tue, 13 Jan 2009 16:50:31 +
>
> Subject: RE: [PHP] PHP unlink Permission Error> From:
> a...@ashleysheridan.co.uk> To: aj...@alumni.iu.edu> CC:
> php-general@lists.php.net> Date: Tue, 13 Jan 2009 16:50:31 +> > On Tue,
> 2009-01-13 at 11:33 -0500, Alice Wei wrote:> > Hi, As
gton, IN 47404
>
> 812-330-6644 (office)
> 812-219-5708 (mobile)
>
> alice@procurecenters.com(email)
> http://www.procurecenters.com/index.php (web)
>
>
>
>
>
>
> __
> Subjec
touch foo.txt
chmod 000 foo.txt
rm foo.txt
rm: remove write-protected regular empty file `foo.txt'?
So the behaviour is at least partially shell/profile dependent...
I have no idea how this would affect PHP unlink, if at all.
ymmv
naiaa
ianasg [*]
[*] sg: shell guru
--
Alice Wei
Indiana University, Master of Information Science
Application Programmer ProCure Treatment Centers, Inc.420 N. Walnut
St.Bloomington, IN 47404812-330-6644 (office)812-219-5708
(mobile)alice@procurecenters.com(email)http://www.procurecenters.com/index.php
(web)
Subject: RE: [PHP]
On Tue, 2009-01-13 at 15:46 +, c...@l-i-e.com wrote:
> Not only do you need to check the return value of chmod to see if it worked,
> but also, I *think*:
>
>
>
> The file withing the directory can have entirely different permissions, and
> making the directory world writable won't help th
No, we tend to bottom-post on this list. It's just how we roll...
Ash
www.ashleysheridan.co.uk
, 0777) or die
("permission canonot be set");, how come the permission of this file is still
0666?
Thanks in advance.
Alice
> Date: Tue, 13 Jan 2009 17:06:37 +0100> From: li...@bithub.net> To:
> aj...@alumni.iu.edu> CC: php-general@lists.php.net> Subject: Re: [PH
output:
>
> 0777Warning: unlink(testFile.txt) [function.unlink]: Permission denied in
> C:\Inetpub\wwwroot\project\file_write.php on line 10Warning:
> unlink(testFile.txt) [function.unlink]: Permission denied in
> C:\Inetpub\wwwroot\project\file_write.php n line 11If this is the ca
Do you have php_safe_mode enabled? If's that's the case, try turning it
off and then run your script again.
Alice Wei wrote:
Hi,
I have a snippet below that I would like to delete a file. However, I keep getting kicked out because of permission errors, when my folder permission is 0777.
Hi,
I have a snippet below that I would like to delete a file. However, I keep
getting kicked out because of permission errors, when my folder permission is
0777.
Is it possible that someone on the list could point out what my possible errors
are to allow this code to be functioning
Not only do you need to check the return value of chmod to see if it worked,
but also, I *think*:
The file withing the directory can have entirely different permissions, and
making the directory world writable won't help that, I don't think...
I could be wrong, and a 000 file in a 777 dir
Hi, Ashley:
I tried to find your corrected errors, but I cannot seem to find it. Have you
sent me an empty reply message by mistake?
Alice> Subject: RE: [PHP] PHP unlink Permission Error> From:
a...@ashleysheridan.co.uk> To: aj...@alumni.iu.edu> CC:
php-general@lists.php.ne
ub\wwwroot\project\file_write.php n line 11
>
> If this is the case, how come I don't have the permissions to delete
> the file?
> Thanks again.
>
> Alice
>
>
> > Subject: Re: [PHP] PHP unlink Permission Error
> > From: a...@ashleysheridan.co.uk
>
\wwwroot\project\file_write.php on line 10Warning:
unlink(testFile.txt) [function.unlink]: Permission denied in
C:\Inetpub\wwwroot\project\file_write.php n line 11If this is the case, how
come I don't have the permissions to delete the file?
Thanks again.
Alice> Subject: Re: [PHP] PH
On Tue, 2009-01-13 at 09:42 -0500, Alice Wei wrote:
> Hi,
>
>I have a snippet of code as follows:
>
>
> ini_set('display_errors', 1); error_reporting(E_ALL);
> $curDir = getcwd();
> echo $curDir;
> chmod($curDir,0777);
> unlink("testFile.txt");
> echo unlink("testFile.txt");
> chmod (
Hi,
I have a snippet of code as follows:
The problem is that I do not seem to have the correct permissions, even though
I seem to have changed the permissions of the folder to 777 already upon the
file deletion time. This is the output I got:
C:\Inetpub\wwwroot\projectWarning: unli
>
> function saveRecord ($db,$POST) {
>$bd = "/absolute_path_to_document_root";
>$fp = "/path_to_files_from_document_root/";
>$ud = $bd . $fp;
> $path = $ud.$file; // absolute path to newly named file
> if ($fail || !$name || !$temp) continue;
> // @unlink
Ok, here is my problem. Using the code below, I am saving a posted form to
a database including the files it contains.
There is one line commented out.. The unlink command. Without the command,
the script works fine and new files
Overwrite the old files when uploaded. If, however, I uncomment
Did you actually READ my previous post that you replied to?...
On Wed, July 18, 2007 1:29 am, [EMAIL PROTECTED] wrote:
> Ok thanks everyone...
>
> I need to throw in a wildcard, how would I do that.. I have this so
> far.
> which dont work.
>
> $filename = '/home/public_html/client/test/*.txt.asc
On Wed, 2007-07-18 at 07:29 +0100, [EMAIL PROTECTED] wrote:
> I need to throw in a wildcard, how would I do that.. I have this so far.
> which dont work.
foreach(glob("*.asc.txt") as $files)
{
unlink($files);
}
--Paul
All Email originating from UWC is covered by disclaimer
http://www.uwc.
ot; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
Sent: Wednesday, July 18, 2007 2:17 AM
Subject: Re: [PHP] Unlink file older then 7 days
On Mon, July 16, 2007 8:40 am, Stut wrote:
Suhas Pharkute wrote:
http://us.php.net/manual/en/function.fileatime.php
$filename = 'somef
On Mon, July 16, 2007 8:40 am, Stut wrote:
> Suhas Pharkute wrote:
>> http://us.php.net/manual/en/function.fileatime.php
>>
>> $filename = 'somefile.txt';
>> if (file_exists($filename) && fileatime($filename) <
>> (time()-(7*24*60*60)) )
>> {
>>unlink($filename);
>> }
>>
>> Read docs!
>
> You
-Original Message-
From: <[EMAIL PROTECTED]>
To:
Date: Mon, 16 Jul 2007 14:25:47 +0100
Subject: Re: [PHP] Unlink file older then 7 days
> How would I use fileatime to check if the file is older then 7 days?
>
>
>
>
something like:
$access = fileatime (c:\pat
Suhas Pharkute wrote:
http://us.php.net/manual/en/function.fileatime.php
$filename = 'somefile.txt';
if (file_exists($filename) && fileatime($filename) <
(time()-(7*24*60*60)) )
{
unlink($filename);
}
Read docs!
You too! The OP wanted a way to "check the age of all files". The
fileatime
http://us.php.net/manual/en/function.fileatime.php
$filename = 'somefile.txt';
if (file_exists($filename) && fileatime($filename) < (time()-(7*24*60*60)) )
{
unlink($filename);
}
Read docs!
Suhas
On 7/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
How would I use fileatime to check
[EMAIL PROTECTED] wrote:
How would I use fileatime to check if the file is older then 7 days?
You want filemtime not fileatime.
-Stut
--
http://stut.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
How would I use fileatime to check if the file is older then 7 days?
I have a directory with .txt and .txt.asc files.
What I want to do is..
Check the age of all files ending in .txt.asc
and if the file *.txt.asc is older then 7 days
delete thatfile.txt.asc and also thatfile.txt
--
PH
On Saturday 14 July 2007 9:16:06 pm [EMAIL PROTECTED] wrote:
> I have a directory with .txt and .txt.asc files.
>
> What I want to do is..
>
> Check the age of all files ending in .txt.asc
>
> and if the file *.txt.asc is older then 7 days
>
> delete thatfile.txt.asc and also thatfile.txt
>
look a
I have a directory with .txt and .txt.asc files.
What I want to do is..
Check the age of all files ending in .txt.asc
and if the file *.txt.asc is older then 7 days
delete thatfile.txt.asc and also thatfile.txt
Thanks
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscrib
On 6/20/07, Brian Dunning <[EMAIL PROTECTED]> wrote:
Can do, but I would be calling clearstatcache() very often, many
times per second, as often as these graphics are being edited. Would
that still be appropriate for the server?
I certainly wouldn't use it if I didn't need it.
--
Greg Donald
Can do, but I would be calling clearstatcache() very often, many
times per second, as often as these graphics are being edited. Would
that still be appropriate for the server?
On Jun 19, 2007, at 8:07 AM, Greg Donald wrote:
On 6/17/07, Brian Dunning <[EMAIL PROTECTED]> wrote:
If I write a
On 6/17/07, Brian Dunning <[EMAIL PROTECTED]> wrote:
If I write an edited image back to disk using imagepng, is it
desirable to first unlink the existing image?
It's not required.
I notice that it works
fine if I don't. Just wondering if there are any pros or cons.
Just be sure and call cle
If I write an edited image back to disk using imagepng, is it
desirable to first unlink the existing image? I notice that it works
fine if I don't. Just wondering if there are any pros or cons.
- Brian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.ne
> Be sure to include the OS, filesystem type and the configure line
> in the report, cause there seems to be something system dependent
> causing it since the script you posted earlier worked fine on my
> system.
Thanks for your help. I appreciate it.
--
PHP General Mailing List (http://www.php.
On Thu, Dec 22, 2005 at 02:41:40PM -0700, jgmtfia Mr wrote:
> > > I just ran the test with php4 cli and it works correctly.
> > > PHP 4.3.10-15 (cli) (built: May 9 2005 08:54:56)
> > >
> > > But with php5 cli and apache2 module it does not:
> > > PHP 5.1.0b3 (cli) (built: Oct 18 2005 16:13:19)
> >
> > I just ran the test with php4 cli and it works correctly.
> > PHP 4.3.10-15 (cli) (built: May 9 2005 08:54:56)
> >
> > But with php5 cli and apache2 module it does not:
> > PHP 5.1.0b3 (cli) (built: Oct 18 2005 16:13:19)
> > PHP 5.1.0 apache module
>
> The versions I ran the tests were on:
>
On Thu, Dec 22, 2005 at 08:29:53AM -0700, jgmtfia Mr wrote:
> > Thank you for checking on this.
> >
> > I am using debain stable with a 2.6.14.3 kernel. The filesystem in
> > question is ext2 on a 48 MB ramdisk.
> >
> > I also did the following on another machine using ext2 on a harddisk
> > with
> Thank you for checking on this.
>
> I am using debain stable with a 2.6.14.3 kernel. The filesystem in
> question is ext2 on a 48 MB ramdisk.
>
> I also did the following on another machine using ext2 on a harddisk
> with command line php.
I just ran the test with php4 cli and it works correctl
> > The loop then continues forever with file_exists() returning true, but
> > unlink() returns false with the error message "Warning:
> > unlink(/config1/C) [function.unlink]: No such file or directory in
> > /www/script.php on line 10"
>
> This might be an issue with the OS or Filessystem. The c
On Wed, Dec 21, 2005 at 11:27:23AM -0700, jgmtfia Mr wrote:
> I have a directory with the files:
> /config/A
> /config/B
> and
> /config/C is a symlink to /config/A.
>
> Via php I unlink /config/C:
>
> $FILE = '/config/C';
> while(file_exists($FILE)){
>
I have a directory with the files:
/config/A
/config/B
and
/config/C is a symlink to /config/A.
Via php I unlink /config/C:
$FILE = '/config/C';
while(file_exists($FILE)){
unlink($FILE);
clearstatcache();
}
When run,
On Saturday 27 November 2004 03:13, Julian wrote:
> I would like to delete a set of images right after they are displayed on
> the page using unlink.
I'm curious to know why you want this.
> Unfortunately, with unlink the images are deleted
> before they display on the user's browser. Is there
:[EMAIL PROTECTED]
> Sent: Friday, November 26, 2004 2:14 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] unlink images
>
> Hello,
> I would like to delete a set of images right after they are
> displayed on the page using unlink. Unfortunately, with
> unlink the images are delete
Vail
> -Original Message-
> From: Julian [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 26, 2004 11:14 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] unlink images
>
>
> Hello,
> I would like to delete a set of images right after they are
> display
Hello,
I would like to delete a set of images right after they are displayed on the
page using unlink. Unfortunately, with unlink the images are deleted before
they display on the user's browser. Is there a way to do this?
Thank you!
--
PHP General Mailing List (http://www.php.net/)
To unsubs
* Thus wrote Jason Wong:
> Please do not top post.
>
> On Wednesday 25 August 2004 01:31, PHP Junkie wrote:
> > Ave,
> >
> > Nope... Didn't work. Didn't return an error or anything, didn't delete the
> > folders either!
>
> > >> system('rm -rf',$user_dir,$ret_val);
>
> That should be:
>
> sys
On Wednesday 25 August 2004 05:31, John Nichel wrote:
> How so? Even if 'nobody' is in the www group, it still wouldn't have
> the proper permissions.
To be able to delete directories, you need:
- 'wx' on the parent directory
- 'rx' on the target directory
To be able to delete files, you nee
Jason Wong wrote:
If Apache is running as nobody/nobody, it does not have permission to
delete these directories. The only users who can delete these
directories are the respective users, and root. You need to have write
permission to delete...
drwxr-xr-x3 www www 102 24 Aug 11:09
On Wednesday 25 August 2004 02:30, John Nichel wrote:
> > This is what I got with ls -al
> >
> > rahul:/Library/WebServer/Documents/informed-sources.com/imsafm bob$ ls
> > -al total 16
> > drwxrwxrwx5 nobody nobody170 24 Aug 13:55 .
> > drwxrwxrwx 102 bob unknown 3468 24 Aug 11:23 .
The reason this works is because you are doing a recursive remove of
the directory. The PHP rmdir() does not remove a directory with
contents in it. If you modify your script so that it walks the users
directory and removes each file and subdirectory then it would
probally have worked correctly.
Please stop top posting.
On Wednesday 25 August 2004 02:20, PHP Junkie wrote:
> Apache to the best of my knowledge runs as "nobody" by default and since I
> didn't change any settings, it is probably running as "nobody".
Instead of speculating, find out for certain by using phpinfo().
--
Jason
Ave,
IT WORKS!!!
I guess it was the syntax which was the problem! Finally it works!!
system("rm -rf $user_dir", $ret_val);
Works perfectly... Removes folder!
Thanks a TON!
On 8/24/04 2:04 PM, "Jason Wong" <[EMAIL PROTECTED]> wrote:
> Please do not top post.
>
> On Wednesday 25 August 2004
Ave,
IT WORKS!!!
I guess it was the syntax which was the problem! Finally it works!!
system("rm -rf $user_dir", $ret_val);
Works perfectly... Removes folder!
Thanks a TON!
On 8/24/04 2:04 PM, "Jason Wong" <[EMAIL PROTECTED]> wrote:
> Please do not top post.
>
> On Wednesday 25 August 2004
PHP Junkie wrote:
Ave,
Apache to the best of my knowledge runs as "nobody" by default and since I
didn't change any settings, it is probably running as "nobody".
This is what I got with ls -al
rahul:/Library/WebServer/Documents/informed-sources.com/imsafm bob$ ls -al
total 16
drwxrwxrwx5 nobody
Ave,
Apache to the best of my knowledge runs as "nobody" by default and since I
didn't change any settings, it is probably running as "nobody".
This is what I got with ls -al
rahul:/Library/WebServer/Documents/informed-sources.com/imsafm bob$ ls -al
total 16
drwxrwxrwx5 nobody nobody170
Please do not top post.
On Wednesday 25 August 2004 01:31, PHP Junkie wrote:
> Ave,
>
> Nope... Didn't work. Didn't return an error or anything, didn't delete the
> folders either!
> >> system('rm -rf',$user_dir,$ret_val);
That should be:
system("rm -rf $user_dir", $ret_val);
--
Jason Wong
PHP Junkie wrote:
Ave,
Nope... Didn't work. Didn't return an error or anything, didn't delete the
folders either!
If you cannot delete via the php functions or via system calls, then you
have a permission problem.
What user/group is Apache running as?
What is the output of 'ls -al' for the files
Ave,
Trust me I do... I double checked it actually..
On 8/24/04 1:41 PM, "Richard Whitney" <[EMAIL PROTECTED]> wrote:
> Dumb question - are you sure you got the path right?
> i.e. /home/public_html/rest/of/your/path
>
> On Tue, 24 Aug 2004 13:31:06 -0400, PHP Junkie <[EMAIL PROTECTED]> wrote:
Ave,
Nope... Didn't work. Didn't return an error or anything, didn't delete the
folders either!
On 8/23/04 8:21 PM, "Richard Whitney" <[EMAIL PROTECTED]> wrote:
> Let me clarify:
>
> system() is like working in a shell
> rm -rf forces removal of the directory $file_dir, which you define bef
Ave,
Richard... What exactly did you mean by this?
system('rm -rf',$user_dir,$ret_val);
I don't understand.
On 8/23/04 12:11 PM, "Richard Whitney" <[EMAIL PROTECTED]> wrote:
> system('rm -rf',$user_dir,$ret_val);
>
> On Mon, 23 Aug 2004 11:57:35 -0400, PHP Junkie <[EMAIL PROTECTED]> wrote:
On Tuesday 24 August 2004 01:55, PHP Junkie wrote:
> I do have the original permission set to CHMOD 777 thus the uploads are
> working fine.
>
> I had presumed that anything uploaded by the server is owned by it thus I
> wouldn't have to interfere with the permissions thereafter... But somehow
> t
On Tuesday 24 August 2004 02:32, John Nichel wrote:
> Jason Wong wrote
>
> > phpinfo() is your friend.
>
> I thought phpinfo() was *MY* friend??? ;)
Don't worry it's a one-to-many relationship.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* We
I guess phpinfo() is *OUR* friend!! Great guy!
Although I'd be happier if my files & folders started getting deleted with
the script, which still ain't happening.
On 8/23/04 2:32 PM, "John Nichel" <[EMAIL PROTECTED]> wrote:
> Jason Wong wrote
>> phpinfo() is your friend.
>>
>
> I thought phpi
Jason Wong wrote
phpinfo() is your friend.
I thought phpinfo() was *MY* friend??? ;)
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tuesday 24 August 2004 00:34, PHP Junkie wrote:
> How do I find out which user/group my web server is running as?
> I'm running an Apache Web Server on my Power MAC G5 (Mac OS X) machine.
> I can change the user/group permissions... But which user/group does the
> web server use?
phpinfo() is
Ave,
I do have the original permission set to CHMOD 777 thus the uploads are
working fine.
I had presumed that anything uploaded by the server is owned by it thus I
wouldn't have to interfere with the permissions thereafter... But somehow
that doesn't seem to be working out.
I did actually set
the chmod 666 sets the exisiting files to be edited by the server.
anything that's uploaded by the server is owned by it, and thusly can be
edited.
as a side note, you'd have to chmod 777 the directory to be edited if
you want uploads to work.
PHP Junkie wrote:
Ave,
Well here's my situation..
Ave,
Well here's my situation...
You see the File Manager allows users to Upload files ... Once a user
uploads the file... It resides in a particular folder on my server. Users
will be constantly uploading, downloading, deleting files. I can't possibly
CHMOD 777 all the time...
My question is...
PHP Junkie wrote:
Ave,
How do I find out which user/group my web server is running as?
I'm running an Apache Web Server on my Power MAC G5 (Mac OS X) machine.
I can change the user/group permissions... But which user/group does the web
server use?
Default setup? Probably nobody/nobody. Check your
PHP probably does not have permission to change those files. chmod 777
and it should work.
However now those files are writable by anyone. If you're on a shared
server there could be problems later.
Jon
PHP Junkie wrote:
Ave,
I do not really know what the problem is because I don't get an err
[snip]
How do I find out which user/group my web server is running as?
I'm running an Apache Web Server on my Power MAC G5 (Mac OS X) machine.
I can change the user/group permissions... But which user/group does the
web
server use?
[/snip]
For security reasons Apache typically runs as "nobody"
--
Ave,
How do I find out which user/group my web server is running as?
I'm running an Apache Web Server on my Power MAC G5 (Mac OS X) machine.
I can change the user/group permissions... But which user/group does the web
server use?
Thanks.
On 8/23/04 12:08 PM, "John Nichel" <[EMAIL PROTECTED]> wro
PHP Junkie wrote:
Again, no error... The entries in the table get deleted.. But file remains
in the directory.
Any suggestions?
Neither of these functions return an error. They will return false on
failure. Does the user/group which your web server is running as have
permission to remove these
Ave,
I do not really know what the problem is because I don't get an error, and
in fact my scripts execute fine... Except that, niether is the directory
deleted, nor is the file deleted. Only corresponding database entries are
deleted which I specify in my SQL code.
There are 2 different function
Yea, got that. Fixed hte problem. Thanks
"Miroslav Hudak" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This could happpen when the file is open by another process,... then
> file is deleted, but filename is still there until the file is not free
> of any open filedescriptors
See my other post on this one. I don't know, maybe a bug in M$ Outlook or
something. (Whistling and looking away from the issues) :-)
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
I have a file that was 25 KB and I use the unlink() to remove the file.
Wh
[snip]
I have a file that was 25 KB and I use the unlink() to remove the file.
When I rechecked it, I found that the file is still there but it's
filesize
is 0 KB. Is unlink() suppose to remove the file or what??
[/snip]
You do not say what your OS is, but I just tested on Linux and BSD and
it 'r
This could happpen when the file is open by another process,... then
file is deleted, but filename is still there until the file is not free
of any open filedescriptors... I don't know exactly what processes
happens in kernel when deleting the file, but it's something like
that... and it could
I have a file that was 25 KB and I use the unlink() to remove the file.
When I rechecked it, I found that the file is still there but it's filesize
is 0 KB. Is unlink() suppose to remove the file or what??
FletchSOD
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
I have a file that was 25 KB and I use the unlink() to remove the file.
When I rechecked it, I found that the file is still there but it's filesize
is 0 KB. Is unlink() suppose to remove the file or what??
FletchSOD
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
Unless you change the permissions of the file, the run the FTP as nobody, run
apache as the ftp user, run apache as root (can't believe I even said that...
blasphemy!), etc., it shouldn't be possible.
If you find a way to do it w/out any of the above, I'd suggest you email the
Apache Software F
Hi,
How can have a php script unlink/delete a file uploaded via FTP?
Usually a ftp-uploaded file belongs to the ftp user, and a php
script is running by apache/nobody. Seems like there shouldn't
be any way to do this...OK, my situation is that I want a php script
to this: it can move bulk uploade
At 16:42 26-2-03, you wrote:
$result=unlink('$dir_to_upload/$row->Photo');
what do you get when you echo
echo htmlspecialchars('$dir_to_upload/$row->Photo');
and do you use the full file path? Images accept relative links but in my
experience PHP's file handling functions want the full path.
-
At 16:42 26.02.2003, Jøran Sørbø spoke out and said:
[snip]
>Hi!
>Ive tried to change the script sometimes now and it still dont work...
>i still get the error Warning: unlink() failed (No such file or directory)
>and it wont remove the data form the database
Hi!
Ive tried to change the script sometimes now and it still dont work...
i still get the error Warning: unlink() failed (No such file or directory)
and it wont remove the data form the database
$dir_to_upload is defined in config.php wich is included...
it works just fine to display image us
At 16:03 26.02.2003, Jøran Sørbø spoke out and said:
[snip]
> if (isset($delimage))
> {
>
>$result=unlink('$dir_to_upload/$Photo');
>
> $result=mysql_query("
>update product set
> Photo='nothing',
> miniPhoto='nothing',
> picture='0'
Hi!
Im developing a site using php and mysql and need som help...
The site is a simple company site and it gets products, pictures etc from
the database...
Everyhing worls great except deleting product images from the database,
and unlink them from the directory...
the code i use is:
the delete f
Hi,
You can use the backtick operator to delete whatever you have
permissions to delete:
$directory = "path/*.*";
`rm -rf $directory`;
They aren't quotes, they are backticks (to the left of the 1 key on most
keyboards). It is very useful for any command line stuff you have
permissions to do.
B
1 - 100 of 139 matches
Mail list logo