It is currently Sat Mar 25, 2017 11:24 pm

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 4 posts ] 
  Print view Previous topic | Next topic 
Author Message
 Post subject: Owner of files created by PHP script
PostPosted: Wed Jul 09, 2003 7:19 am 
Offline
Clients

Joined: Tue Jul 08, 2003 10:28 pm
Posts: 4
Hi,

I have been testing a PHP script that uses templates to generate .html pages for a small site. (one provides the template variables like ".title", and it replaces it with the current value of this variable,etc.; thereby generating a .html page).

The problem here is that the owner of the .html file thus created would be the user (usually 'nobody' or 'apache') under which apache or php is being run. Unless I chmod() all such files to 0777 within that script, it is not possible for me to later delete/manipulate such .html files or folders (generated by this script) using FTP.

I have tried to look into chown(), but it only works for the superuser.

I am looking for a way to chown() the files created by such a script to my own username, so I can later modify these files at will. Any ideas?

Thanks



Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2003 11:47 am 
Offline
Sprintserve Staff
User avatar

Joined: Mon Jan 13, 2003 10:51 am
Posts: 128
Hi MM,

This has unfortunately been an issue with PHP not running under CGI mode. At this moment, this is the limitation of using PHP for a task that you have in mind. Due to the implications of using CGI mode, we are currently not looking at implementing.

The workaround is to either use CGI for what you have in mind, or to simply request once a while for us to reset the permissions for you.

Please feel free to contact us if you have more doubts or need more assistance on this issue. Thanks for hosting with us!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2003 3:07 pm 
Offline
Clients

Joined: Tue Jul 08, 2003 10:28 pm
Posts: 4
ok. :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 12, 2004 6:25 am 
Offline
Sprintserve Staff
User avatar

Joined: Mon Jan 13, 2003 10:51 am
Posts: 128
For those who are still interested in the issue, we have recently converted all our servers to run PHP in CGI mode which will allow all PHP scripts to run as the owner of the scripts. This will solve this issue mentioned here. For more information on the impact, you can refer to:

viewtopic.php?t=79


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
skymiles v1.1 desgined by CodeMiles Team -TemplatesDragon-.