ionCube Logo
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


 
Post new topic   Reply to topic    ionCube Forum Index -> ionCube Package Foundry

Write enable directory

Author Message
Joris Vincken



Joined: 24 Apr 2006
Posts: 17

PostPosted: Mon Apr 24, 2006 7:50 am    Post subject: Write enable directory Reply with quote

Hello all,
I was wondering how you make a directory write enabled using IPF? On some servers PHP needs to have the directory set to 757 while on others to 775 to be write enabled (depending on how PHP was installed).

Is there a way to find out which one to use (with IPF) or do you just create two installers?
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2757

PostPosted: Mon Apr 24, 2006 9:39 am    Post subject: Reply with quote

You can set custom file and folder permissions, but the installer won't detect whether 757 or 775 is required. However, where elevated file permissions are required, e.g. for the web server to be able to save a configuration file, elevating to 777 is typically done.
_________________
Community Admin
Back to top
View user's profile Send private message
speedpacket



Joined: 16 Jul 2006
Posts: 3

PostPosted: Sun Jul 16, 2006 6:20 pm    Post subject: better idea perhaps? Reply with quote

Hello,


We just purchased IPF, and WOW - what a great product, so congrats for that!
With regards to this topic, I myself have a suggestion that you might be interested in...

In stead of chmodding to 777, any server administrator will of course agree to me that we don't really want that, and in stead prefer to do a chown so that the files / folders are actually owned by the user php runs as, so that he can in fact modify the contents/create files in these folders...

Now, To achieve this goal, what I would love to see in a installer is the following:

in stead of uploading the entire file set using plain ftp, I would suggest that IPF does upload an "installer.php" script that is then being called, and bears the logic to create the files and folders it needs (f course, being called from the IPF); that way whatever file you create or folder you create, will be owned by the php user, which al;so makes it possible to make changes to whatever files we need Smile

Any suggestions/ideas on this topic?
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2757

PostPosted: Sun Jul 16, 2006 8:18 pm    Post subject: Reply with quote

Hi

Good idea. You should be able to almost do all of this as IPF supports execution of a post instll script, which can be either interactive in a browser or run in the background. The post install script could create the necessary files as you decribe. To do this fully you would need to have a directory first of all as 777, then create a subdirectory from the PHP script so that the subdirectory was owned by the web user, create the files inside there from the PHP script, and chmod the parent directory back to 755 once the subdirectory was created. As things are now, provided that the parent directory is chmoded such that the post install script can create the subdirectory then you can do everything except putting the parent directory back to 755. We'll certainly consider this for a future feature.
_________________
Community Admin
Back to top
View user's profile Send private message
Joris Vincken



Joined: 24 Apr 2006
Posts: 17

PostPosted: Wed Jul 26, 2006 2:57 pm    Post subject: Reply with quote

That is exactly the way I am doing it now.

Indeed having a way to change the parent back to 755 would be brilliant.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> ionCube Package Foundry All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum