Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
access audio blue screen boot bsod connection crash dell desktop driver drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem processor ram recovery router screen slow sound spyware tdlwsp.dll trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
chmod files

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
Fenix's Avatar
Junior Member with 20 posts.
 
Join Date: Jun 2003
25-Nov-2006, 01:21 PM #1
Exclamation chmod files
Hi,
I have a linux apache web server server running and I'm creating files to run just once. Once I run it via the web, I chmod 700 file.php and I shouldn't be able to run it via the web anymore, correct? The only way I can get it to not run is to chmod 000 file.php, but why doesn't 700 work? When I do chmod 700 file.php, I exit my ssh session so I'm not longer associated with the server, therefore I'm in the "other" group, but it still executes. Any ideas?
O111111O's Avatar
Computer Specs
Senior Member with 896 posts.
 
Join Date: Aug 2005
Location: Right here.
Experience: 31337
26-Nov-2006, 01:26 AM #2
You don't have apache jailed / are running the process are root.

Check the ownership of the file.
AGCurry's Avatar
Senior Member with 431 posts.
 
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
27-Nov-2006, 09:13 AM #3
What 01111110 is trying to say is that the web user is not the owner of the file. The owner is whoever apache is running as.
O111111O's Avatar
Computer Specs
Senior Member with 896 posts.
 
Join Date: Aug 2005
Location: Right here.
Experience: 31337
27-Nov-2006, 02:02 PM #4
Quote:
Originally Posted by AGCurry
What 01111110 is trying to say is that the web user is not the owner of the file. The owner is whoever apache is running as.
Yeah, what you said. Except, I think Fenix is trying to prevent an anonymous user from executing the file.
AGCurry's Avatar
Senior Member with 431 posts.
 
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
28-Nov-2006, 08:52 AM #5
I don't know much about PHP. Does a PHP script execute on its own, like a shell script, or is it interpreted like an awk script? If interpreted, all you would need to run it would be read permission.
O111111O's Avatar
Computer Specs
Senior Member with 896 posts.
 
Join Date: Aug 2005
Location: Right here.
Experience: 31337
28-Nov-2006, 03:20 PM #6
Yep, it can execute as shell.

http://us2.php.net/features.safe-mode
Squashman's Avatar
Distinguished Member with 14,988 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: IIAHYAYCESA,YAADA!
28-Nov-2006, 07:33 PM #7
4 - Read
2 - Write
1 - Execute

So what is wrong with it being 600
O111111O's Avatar
Computer Specs
Senior Member with 896 posts.
 
Join Date: Aug 2005
Location: Right here.
Experience: 31337
29-Nov-2006, 11:22 AM #8
I think he wants to be able to execute the file, possibly as authenticated user.
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 02:26 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.