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 acer asus bios bsod computer crash driver drivers error ethernet excel freeze gaming google hard drive hardware hdmi internet laptop malware memory monitor motherboard mouse network operating system printer problem ram random registry repair router security slow software sound trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
chmod files

Reply  
Thread Tools
Fenix's Avatar
Junior Member with 20 posts.
 
Join Date: Jun 2003
25-Nov-2006, 02: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, 02: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, 10: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, 03: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, 09: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, 04:20 PM #6
Yep, it can execute as shell.

http://us2.php.net/features.safe-mode
Squashman's Avatar
Trusted Advisor with 18,705 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
28-Nov-2006, 08: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, 12:22 PM #8
I think he wants to be able to execute the file, possibly as authenticated user.
Reply

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.

Search Tech Support Guy

Find the solution to your
computer problem!




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



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:36 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.