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 10-15-2009, 07:27 AM   #1
marcjacob
Confirmed User
 
marcjacob's Avatar
 
Join Date: Jun 2003
Location: England
Posts: 1,063
PHP question

I'm using mkdir() to create folders but I can't then delete the folder. The permissions are set to 745 but I thought mkdir() would also chmod?

I'm using:

mkdir($make, 0777);

Any idea why?
marcjacob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-15-2009, 07:29 AM   #2
Killswitch - BANNED FOR LIFE
Guest
 
Posts: n/a
www.php.net/mkdir
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-15-2009, 07:31 AM   #3
marcjacob
Confirmed User
 
marcjacob's Avatar
 
Join Date: Jun 2003
Location: England
Posts: 1,063
That's what I've done, unless you mean to make it reccursive?
marcjacob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-15-2009, 07:38 AM   #4
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
Note: When safe mode is enabled, PHP checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed.
__________________
I like pie.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-15-2009, 08:15 AM   #5
AIbenjamink
Confirmed User
 
AIbenjamink's Avatar
 
Industry Role:
Join Date: Jan 2009
Posts: 420
Are you trying to remove directories which contain files? Are you trying to remove with PHP or via FTP?
__________________
Benjamin : [email protected] : 405-243-447 : www.AdultInterface.com

AIbenjamink is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-15-2009, 08:21 AM   #6
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
The folder created is owned by the "apache" user, no matter what permissions you change to you won't be able to delete it with your ftp user... (without tweaking server settings elsewhere)
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

Last edited by woj; 10-15-2009 at 08:22 AM..
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-15-2009, 08:33 AM   #7
marcjacob
Confirmed User
 
marcjacob's Avatar
 
Join Date: Jun 2003
Location: England
Posts: 1,063
Woj can I use chown() to change ownership to my ftp login?
marcjacob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-15-2009, 08:53 AM   #8
marcjacob
Confirmed User
 
marcjacob's Avatar
 
Join Date: Jun 2003
Location: England
Posts: 1,063
chown() didn't work but mkdir($make, 0777); chmod($make, 0777); made directories deletable through ftp. Odd.
marcjacob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-15-2009, 09:12 AM   #9
beta-tester
Rock 'n Roll Baby!
 
Join Date: Sep 2004
Location: USA, temporarly
Posts: 22,562
you will need to umask the user and then revert it in order to delete folders made by php.
__________________

Sig for sale. Affordable prices. Contact me and get a great deal ;)

My contact:
ICQ: 944-320-46
e-mail: manca {AT} HotFreeSex4All.com
beta-tester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-15-2009, 09:26 AM   #10
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Quote:
Originally Posted by marcjacob View Post
The permissions are set to 745 but I thought mkdir() would also chmod?
Yes it will, unless this is a Windows machine...
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked 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.