Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread PHP Junkie
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread PHP Junkie
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,

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread John Nichel
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread 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 $user_dir, $ret_val); -- Jason Wong -

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread PHP Junkie
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread John Nichel
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread PHP Junkie
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,

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread PHP Junkie
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,

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread Jason Wong
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread William Moore
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.

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread Jason Wong
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 ..

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread John Nichel
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread Jason Wong
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-24 Thread Curt Zirzow
* 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

[PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread PHP Junkie
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread John Nichel
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread PHP Junkie
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:

RE: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread Jay Blanchard
[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 --

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread Jonathan Haddad
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread John Nichel
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread PHP Junkie
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...

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread Jonathan Haddad
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread PHP Junkie
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread Jason Wong
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread John Nichel
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread PHP Junkie
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread Jason Wong
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread Jason Wong
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

Re: [PHP] unlink() rmdir() ... Problems.

2004-08-23 Thread PHP Junkie
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,