Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-05-2007, 02:31 AM   #1
Registered: Sep 2006
Location: Slovakia
Distribution: Debian, Gentoo
Posts: 34

Rep: Reputation: 15
php execute permission


I have a problem that my PHP executes even with no execute permissions. It is a problem because I have a ftp upload directly to web root - anonymous (to share some photos). And it is a big problem if someone uploads php and executes it. The ftp is set to umask 333 so no write or execute permissions are enabled at all...

I run PHP as an Apache module on Ubuntu Linux.

Thanx in advance.
Old 04-05-2007, 08:05 AM   #2
Registered: Nov 2003
Location: Bristol, UK
Distribution: Debian Lenny, Gentoo (at work)
Posts: 388

Rep: Reputation: 32
That's the correct operation, because the PHP script doesn't actually execute, it gets read by the PHP interpreter (so just needs read permission, not execute). I'd say what you should be doing is not allowing anonymous FTP uploads directly to a web accessible directory. You've got a number of options.

One possibility is to set up the FTP server to upload somewhere else (not web-accessible), and then write a simple shell script that runs every few minutes via cron to copy recognised image files into the web root.

Alternatively, if you only have a small number of trusted users, setting up password based FTP access (rather than anonymous) would probably help.


execute, permissions, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
cannot execute bash: permission denied flipwhy Linux - Newbie 11 11-12-2007 10:49 AM
Permission denied to execute anything under /home ErrorBound Linux - Software 8 07-26-2006 09:21 AM
vfat execute permission Akuji Slackware 3 08-20-2004 12:38 PM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 11:51 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration