Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics 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 contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 5:12 PM   #1
Wojciech Kocjan
 
Wojciech Kocjan's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default TCL as CGI.. or PHP and no CGI? The choice is yours

Phil Powell wrote:
> I am having to use CGI script to view files in a particular directory
> (directory has permissions of 755 and has the same ownership as everywhere
> else). I am able to upload the file using PHP, however, I am unable to view
> or list the files because of permission errors.
> [cut]


That's actually a bit of a tough one. This is a very common permission
problem, since your scripts run as www, and not as phil. If you really
want to store the files as phil (which I'm not sure is a good idea), you
can:

1/ run your Tcl CGI scripts via suid tcl interpreter; for example get a
tclkit, make it chmod 6755 - but then, you'll have a security problem,
since anyone clever enough will be able to run your tclkit with his/her
script (and therefore work as phil) - not a good option, IMHO

2/ use a suid starpack, better than 1/, since the script will be
embedded in the interpreter, so noone will run it except you.

3/ write a simple Tcl app that does Tcl_CreateInterp(), Tcl_Init(),
Tcl_FindExecutable() and Tcl_EvalFile(); make it suid

4/ run tclhttpd (on another port) as phil and have tclhttpd serve as
your webserver - I'm not sure if it handles uploads though. Try googling
on that.

5/ ask your system administrator to run PHP scripts as their owner -
this is possible, AFAIR, however I do not use PHP, so cannot help here



--
WK

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:12 PM   #2
Vid Strpic
 
Vid Strpic's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default TCL as CGI.. or PHP and no CGI? The choice is yours

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wojciech Kocjan whispered unto us in comp.lang.php:

[...]

> 5/ ask your system administrator to run PHP scripts as their owner -
> this is possible, AFAIR, however I do not use PHP, so cannot help here


Fortunately, yes, this is possible... just put PHP into 'safe mode' and
it will run as user who owns the files. Sorry, I don't know for Tcl
CGI, suexec will probably do that, but there are years since my using
it, so my memory may be a bit rusty...


- Vid `RTFM` Strpic.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/QK0oq1AzG0/iPGMRAiKCAJ9sfEYbgWa9ssvdz0q26y5b8g6kAACglAEo
R49ic4vCRWQnoTJxOPy5PgA=
=cagC
-----END PGP SIGNATURE-----

--
vms@bofhlet.net, IRC:*@Martin, /bin/zsh. C|N>K
Linux moria 2.4.21 #1 Sat Jul 5 16:11:20 CEST 2003 i686
12:38:58 up 28 days, 21:23, 5 users, load average: 0.07, 0.04, 0.14
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Engine of Choice clarise Search Engines and Directories 26 05-21-2008 1:50 AM
Quiz/multiple choice resources Web Developer HTML 0 07-01-2007 1:42 PM
Amplifier choice. Neil Pollicott Car audio 3 06-18-2007 12:29 PM
Help with my final choice Tony Car audio 1 06-17-2007 3:04 PM
GPS - your choice? Dustin07 GPS 9 06-23-2006 2:39 PM


Featured Websites




All times are GMT +1. The time now is 1:02 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98