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
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,
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
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 -
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 24
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,
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 01:31,
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 01:31,
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 Wong
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.
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 ..
Jason Wong wrote:
snip
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
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
* 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:
system(rm -rf
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
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,
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] wrote:
[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
--
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
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
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...
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
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
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
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
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 phpinfo() was
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
* Web
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
that
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:
Ave,
29 matches
Mail list logo