Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-23-2007, 02:12 AM   #1
jOE :D
Confirmed User
 
Join Date: Jan 2007
Posts: 185
PHP renaming folder problem

I'm trying to rename a folder from a php file and it's giving me an error. I'm getting a 'Permission Denied' error, but the folder chmod is 777 so I don't understand why I'm getting this error.
__________________
Need design work or PHP coding? -> Offbeatideas - What's your idea?
Contact me for all your Predator integration needs!
----------------------------------
My Sites: SpeedySpank (70% ratio - Signup) - Liz Vicious Blog
AIM: practicetitoism | ICQ: 462598451
jOE :D is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 02:39 AM   #2
teksonline
So Fucking Banned
 
Join Date: Jan 2005
Location: At My Desk
Posts: 2,904
is it outside of the script parent directory?
teksonline is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 02:41 AM   #3
dissipate
The Dirty Frenchman
 
dissipate's Avatar
 
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
the script doesnt have permissions for the folder, you'll have to chown it to a different owner with the correct delete privileges.
dissipate is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 02:41 AM   #4
jOE :D
Confirmed User
 
Join Date: Jan 2007
Posts: 185
Quote:
Originally Posted by teksonline View Post
is it outside of the script parent directory?
Yes the script is in '/includes/cron' and the folder name I want to change is just in /. I'm using full paths to the folders though.
__________________
Need design work or PHP coding? -> Offbeatideas - What's your idea?
Contact me for all your Predator integration needs!
----------------------------------
My Sites: SpeedySpank (70% ratio - Signup) - Liz Vicious Blog
AIM: practicetitoism | ICQ: 462598451
jOE :D is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 02:43 AM   #5
dissipate
The Dirty Frenchman
 
dissipate's Avatar
 
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
It's also sort of disturbing that you advertise PHP coding, and wouldn't know something trivial like file permissions.
dissipate is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 02:45 AM   #6
jOE :D
Confirmed User
 
Join Date: Jan 2007
Posts: 185
Quote:
Originally Posted by dissipate View Post
It's also sort of disturbing that you advertise PHP coding, and wouldn't know something trivial like file permissions.
I understand file permissions. The permissions to the folder are 777 so others should be able to execute stuff on the folder.
__________________
Need design work or PHP coding? -> Offbeatideas - What's your idea?
Contact me for all your Predator integration needs!
----------------------------------
My Sites: SpeedySpank (70% ratio - Signup) - Liz Vicious Blog
AIM: practicetitoism | ICQ: 462598451
jOE :D is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 02:45 AM   #7
teksonline
So Fucking Banned
 
Join Date: Jan 2005
Location: At My Desk
Posts: 2,904
are you in safe mode?
teksonline is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 02:49 AM   #8
dissipate
The Dirty Frenchman
 
dissipate's Avatar
 
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
Quote:
Originally Posted by jOE :D View Post
I understand file permissions. The permissions to the folder are 777 so others should be able to execute stuff on the folder.
Yes, but there is also an OWNER of the file/folder, you fucking boob. There is a different between chroot and chown. If it's in /includes/cron then it is is most likely owned by the root user. A simple 'ls -l' will show the owner. And your script isnt being executed by the root user unless you're executing it from the command line.
dissipate is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 02:52 AM   #9
jOE :D
Confirmed User
 
Join Date: Jan 2007
Posts: 185
Quote:
Originally Posted by dissipate View Post
Yes, but there is also an OWNER of the file/folder, you fucking boob. There is a different between chroot and chown. If it's in /includes/cron then it is is most likely owned by the root user. A simple 'ls -l' will show the owner. And your script isnt being executed by the root user unless you're executing it from the command line.
Well then how do I get around that so I can have it executed from the web?
__________________
Need design work or PHP coding? -> Offbeatideas - What's your idea?
Contact me for all your Predator integration needs!
----------------------------------
My Sites: SpeedySpank (70% ratio - Signup) - Liz Vicious Blog
AIM: practicetitoism | ICQ: 462598451
jOE :D is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 03:00 AM   #10
dissipate
The Dirty Frenchman
 
dissipate's Avatar
 
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
Quote:
Originally Posted by jOE :D View Post
Well then how do I get around that so I can have it executed from the web?
http://www.php.net
http://www.google.com

The interwebz is for porn.
dissipate is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 03:02 AM   #11
jOE :D
Confirmed User
 
Join Date: Jan 2007
Posts: 185
Quote:
Originally Posted by dissipate View Post
http://www.php.net
http://www.google.com

The interwebz is for porn.
Thanks, I didn't think of those sites before I wasted time posting on a forum. Who would have thought those sites would have helped?
__________________
Need design work or PHP coding? -> Offbeatideas - What's your idea?
Contact me for all your Predator integration needs!
----------------------------------
My Sites: SpeedySpank (70% ratio - Signup) - Liz Vicious Blog
AIM: practicetitoism | ICQ: 462598451
jOE :D is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 03:08 AM   #12
dissipate
The Dirty Frenchman
 
dissipate's Avatar
 
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
Quote:
Originally Posted by jOE :D View Post
Thanks, I didn't think of those sites before I wasted time posting on a forum. Who would have thought those sites would have helped?
Well now that you know what your problem is, maybe they will help. Merry XMAS.
dissipate is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 03:09 AM   #13
teksonline
So Fucking Banned
 
Join Date: Jan 2005
Location: At My Desk
Posts: 2,904
Who cares who owns it, when its 777 its world writable
the problem is php security can not write outside its root in safe mode
teksonline is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 03:12 AM   #14
dissipate
The Dirty Frenchman
 
dissipate's Avatar
 
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
Quote:
Originally Posted by teksonline View Post
Who cares who owns it, when its 777 its world writable
the problem is php security can not write outside its root in safe mode

When safe_mode is on, PHP checks to see if the owner of the current script matches the owner of the file to be operated on by a file function or its directory. So yes, the owner of the file matters.
dissipate is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 03:36 AM   #15
jOE :D
Confirmed User
 
Join Date: Jan 2007
Posts: 185
Quote:
Originally Posted by dissipate View Post
When safe_mode is on, PHP checks to see if the owner of the current script matches the owner of the file to be operated on by a file function or its directory. So yes, the owner of the file matters.
Safe mode is off for this domain
__________________
Need design work or PHP coding? -> Offbeatideas - What's your idea?
Contact me for all your Predator integration needs!
----------------------------------
My Sites: SpeedySpank (70% ratio - Signup) - Liz Vicious Blog
AIM: practicetitoism | ICQ: 462598451
jOE :D is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 03:38 AM   #16
teksonline
So Fucking Banned
 
Join Date: Jan 2005
Location: At My Desk
Posts: 2,904
su_exec? come on man, fill us in on required details and then the answer will present itself
teksonline is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 04:37 AM   #17
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,229
check for openbasedir restrictions? the user that owns it wouldn't matter, as if its chmodded to 0777 it's world writable anyways.

How are you trying to rename it? exec('mv source target') or what?
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 04:41 AM   #18
teksonline
So Fucking Banned
 
Join Date: Jan 2005
Location: At My Desk
Posts: 2,904
I imagine he is unsing rename()
maybe he can't rename it because he is in it?
teksonline is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 04:48 AM   #19
Damian_Maxcash
So Fucking Banned
 
Join Date: Oct 2002
Location: MaxCash.com
Posts: 12,745
I had a similar problem and it was my dumb host.... change it to 755 and try it.

It worked for me and they said it was some security shit that wouldnt let 777 work.
Damian_Maxcash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 05:48 PM   #20
etcohen
Registered User
 
Join Date: Jan 2007
Posts: 43
you can try set file privilege for web..

chown www 'filename'
etcohen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 05:49 PM   #21
Iron Fist
Too lazy to set a custom title
 
Join Date: Dec 2006
Posts: 23,400
Quote:
Originally Posted by dissipate View Post
It's also sort of disturbing that you advertise PHP coding, and wouldn't know something trivial like file permissions.
Yikes.
__________________
i like waffles
Iron Fist is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2007, 05:49 PM   #22
teksonline
So Fucking Banned
 
Join Date: Jan 2005
Location: At My Desk
Posts: 2,904
Quote:
Originally Posted by Damian_Maxcash View Post
I had a similar problem and it was my dumb host.... change it to 755 and try it.

It worked for me and they said it was some security shit that wouldnt let 777 work.
Uhm, could be some sort of suexec thing which i asked about above, but don't sound right. i could see an error trying to access contents, but not rename..

He isnt providing system info, so no sense wasting brains over this one...
teksonline is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.