How to prevent excutable files run in the DOCUMENT_ROOT
How to prevent excutable files run in the DOCUMENT_ROOT of the apache server?
I just want it to run in /var/www/cgi-bin but not /var/www/html
As far as I know, there is a module called SELinux in Fedora Core to protect the DOCUMENT_ROOT.
I guess i just dont get it. chalk it up to a language barrier, or me not understanding...
if you script is not executable (noexecute setting in apache, not in filesystem) then it shouldn't matter..
if you do want at to be execute, but just want to control "where" it executes, you might consider running a chroot or something early in the script.
and for gods sake..dont allow user input to ever determine a path or filename directly...
/me shivvers
Similar Messages
-
How to prevent a file from stripping?
I'm building vacation for Arch64 but should be the same for 32bit. PKGBUILD looks like this:
# $Id: PKGBUILD,v 1.1 2004/01/21 15:43:15 dale Exp $
# Maintainer: dale <[email protected]>
pkgname=vacation
pkgver=1.2.6.1
pkgrel=1
pkgdesc="an automatic mail-answering program"
depends=(gdbm)
url="http://www.tosn.org/projects/vacation/"
source=(http://www.tosn.org/projects/vacation/files/$pkgname-$pkgver.tar.gz vacation.patch)
build() {
cd $startdir/src/$pkgname
mkdir -p $startdir/pkg/usr/{bin,man/man1}
# keeps binary from building
rm -rf vacation
# fixing the Makefile - not only for arch64
sed -i -e 's: -m486::; s:CFLAGS.*= (.*):CFLAGS += 1:' $startdir/src/$pkgname/Makefile
sed -i -e "s:/usr/bin:$startdir/pkg/usr/bin:g" $startdir/src/$pkgname/Makefile
mv vacation.man vacation.1
make install
These file have been created:
[andyrtr@workstation64 vacation]$ ls -lRA pkg/
pkg/:
insgesamt 0
drwxr-xr-x 4 andyrtr users 96 2006-01-28 09:32 usr
pkg/usr:
insgesamt 0
drwxr-xr-x 2 andyrtr users 96 2006-01-28 09:32 bin
drwxr-xr-x 3 andyrtr users 72 2006-01-28 09:32 man
pkg/usr/bin:
insgesamt 24
-rwxr-xr-x 1 andyrtr users 16864 2006-01-28 09:32 vacation
-rw------- 1 andyrtr users 470 2006-01-28 09:32 vaclook
pkg/usr/man:
insgesamt 0
drwxr-xr-x 2 andyrtr users 48 2006-01-28 09:32 man1
pkg/usr/man/man1:
insgesamt 0
[andyrtr@workstation64 vacation]$
I get this error:
==> Starting build()...
gcc -march=x86-64 -O2 -pipe -Wall -Xlinker -warn-common -D_PATH_VACATION="/var/abs/extra/system/vacation/pkg/usr/bin/vacation" -o vacation vacation.c -lgdbm
install -s -m 755 vacation /var/abs/extra/system/vacation/pkg/usr/bin/vacation
install -s -m 755 vaclook /var/abs/extra/system/vacation/pkg/usr/bin/vaclook
strip: /var/abs/extra/system/vacation/pkg/usr/bin/vaclook: File format not recognized
install: strip fehlgeschlagen
make: *** [install] Fehler 1
==> ERROR: Build Failed. Aborting...
Krusader detects it as a Perl program. Any idea?
AndyRTRPosted: Sat Jan 28, 2006 8:45 am Post subject: How to prevent a file from stripping?
I'm building vacation for Arch64 but should be the same for 32bit. PKGBUILD looks like this:
Code:
# $Id: PKGBUILD,v 1.1 2004/01/21 15:43:15 dale Exp $
# Maintainer: dale <[email protected]>
pkgname=vacation
pkgver=1.2.6.1
pkgrel=1
pkgdesc="an automatic mail-answering program"
depends=(gdbm)
url="http://www.tosn.org/projects/vacation/"
source=(http://www.tosn.org/projects/vacation/files/$pkgname-$pkgver.tar.gz vacation.patch)
build() {
cd $startdir/src/$pkgname
mkdir -p $startdir/pkg/usr/{bin,man/man1}
# keeps binary from building
rm -rf vacation
# fixing the Makefile - not only for arch64
sed -i -e 's: -m486::; s:CFLAGS.*= (.*):CFLAGS += 1:' $startdir/src/$pkgname/Makefile
sed -i -e "s:/usr/bin:$startdir/pkg/usr/bin:g" $startdir/src/$pkgname/Makefile
mv vacation.man vacation.1
make install
These file have been created:
Code:
[andyrtr@workstation64 vacation]$ ls -lRA pkg/
pkg/:
insgesamt 0
drwxr-xr-x 4 andyrtr users 96 2006-01-28 09:32 usr
pkg/usr:
insgesamt 0
drwxr-xr-x 2 andyrtr users 96 2006-01-28 09:32 bin
drwxr-xr-x 3 andyrtr users 72 2006-01-28 09:32 man
pkg/usr/bin:
insgesamt 24
-rwxr-xr-x 1 andyrtr users 16864 2006-01-28 09:32 vacation
-rw------- 1 andyrtr users 470 2006-01-28 09:32 vaclook
pkg/usr/man:
insgesamt 0
drwxr-xr-x 2 andyrtr users 48 2006-01-28 09:32 man1
pkg/usr/man/man1:
insgesamt 0
[andyrtr@workstation64 vacation]$
I get this error:
==> Starting build()...
gcc -march=x86-64 -O2 -pipe -Wall -Xlinker -warn-common -D_PATH_VACATION="/var/abs/extra/system/vacation/pkg/usr/bin/vacation" -o vacation vacation.c -lgdbm
install -s -m 755 vacation /var/abs/extra/system/vacation/pkg/usr/bin/vacation
install -s -m 755 vaclook /var/abs/extra/system/vacation/pkg/usr/bin/vaclook
strip: /var/abs/extra/system/vacation/pkg/usr/bin/vaclook: File format not recognized
install: strip fehlgeschlagen
make: *** [install] Fehler 1
==> ERROR: Build Failed. Aborting...
Looks like its tring to install to /var/abs/extra/system/vacation/pkg/usr/bin....... ????
try make DESTDIR=$startdir/pkg/usr install -
How do I share files uploaded into the Creative Cloud with other creative cloud members?
How do I share files uploaded into the Creative Cloud with other creative cloud members?
Should be easy. Try this...
In Thumbnails view, click the little triangle (pointing downward) in the lower-right corner of the asset you want to share.
In the blue icon bar that appears, click the Share icon (the third icon from the left, just right of the trash icon). The Share dialog should pop up.
In the Share dialog, enter the email address of the person with whom you want to share the asset, then click the Send Email button - they'll receive an email with a link to your asset. OR
You can also copy a link to the asset and then paste that into your own email client if you prefer. To do that, click the Link icon (looks like a "chain", and is to the right of the email "envelope" icon) - then click the Copy Link button.
Note that the Share options won't be available if your asset is set to "Private" - you can control whether an asset can be viewed (or downloaded) by others by clicking the Public/Private control (green or red "lock" icon).
You can also access the same Share controls if you click on the file to see it one-up (you can do this from either Thumbnails view or List view); click the Share icon near the upper right corner of the browser window (to the right of the asset name).
Hope that helps. -
How many threads can be running at the same time
Hi!!
Dows anyone knows how many Threads can be running at the same time in the JVM.
I'm making a multi thread client-server app and I would like to know how much simultneous connections the JVM support. I'm using one Thread per connection.Hi, thanks to all for your answers.
I think that I made the wrong question, as you said: "that means the number of threads currently created".
I'm worry about this because my application is already online (It's a mail server -SMTP and POP3 server using ORACLE for the users database- ) and some other user post in the "multi-tread forum" that almost any JVM can only have 700 threads created at the same time, and I've never heard or read anything about this.
what you mean with the stack space (memory??)
I'm using the JavaWebServer 2.0 and a servlet to start the main Thread.
Again Thanks to all for the answers but I think that the schapel answer is the one that solve my doubt... -
How to open a file created at the server through form/report at client end
How to open a file created at the server through form/report at client end
Dear Sir/Madame,
I am creating a exception report at the server-end using utl file utility. I want to display this report at the client end. A user doesn't have any access to server. Will u please write me the solution and oblige me.
Thanks
Rajesh JainOne way of doing this is to write a PL/SQL procedure that uses UTL_FILE to read the file and DBMS_OUTPUT to display the contents to the users.
Cheers, APC -
My mac book startup disk is full and when I start it, it give me a blank blue screen. I have tried the shift upon start
and I started in safe mode, and it gave me the stars screen. How can I delete files to fix the problem1. Start up in Safe Mode.
http://support.apple.com/kb/PH11212
2. Empty Trash.
http://support.apple.com/kb/PH10677
3. Delete "Recovered Messages", if any.
Hold the option key down and click "Go" menu in the Finder menu bar.
Select "Library" from the dropdown.
Library > Mail > V2 > Mailboxes
Delete "Recovered Messages", if any.
Empty Trash. Restart.
4. Delete old iOS Devices Backup.
iTunes > Preferences > Devices
Highlight the old Backups , press “Delete Backup” and then “OK”.
http://support.apple.com/kb/HT4946?viewlocale=en_US&locale=en_US
5. Re-index Macintosh HD
System Preferences > Spotlight > Privacy
http://support.apple.com/kb/ht2409 -
I have recently changed to an iMac from a Windows PC. How do I delete files and reformat the memory card in my helmetcam?
If you return the memory card to the helmetcam, it may choose to reformat it before use; back to some FAT-16 or FAT-32 format many of these third-party cards and cameras use. Unless you were going to use it for Mac OS X and format it with HFS+ or in a partition map for Mac data, etc.
If not, the easiest way to reformat the card may have been in the camera itself. I've formatted several kinds of camera cards, drives, USB flash drive, and others. The means varies with the intended purpose. Sometimes the default is the best; since it is platform neutral if the device is seen by both players.
Good luck & happy computing! -
How to turn off programs running in the background in the background on iPad
how to turn off programs running in the background in the background on iPad
Most apps do not run in the background on an iPad. Their stae is kept in memory so that when you start the app again it will load quickly at the location you last used it. But you can remove these apps from the Recently Used list. Here's how:
Double click the Home button to show the screen with running and recently used apps. Each app icon will have a sample page above it. Flick up on the page (not the app icon) and the page will fly away and the app icon will disappear. This quits that app.
Some apps do refresh in the background if you have that Setting turned on. You can control apps there individually or turn off Back Ground App Refresh completely in the Settings App.
Settings > General > Background App Refresh -
HOW DO I DELETE PROGRAMS RUNNING IN THE BACKGROUND OF MY IPHONE WITH SOFTWARE IOS7
How do I delete programs running in the background now that I have upgraded my software to IOS7?
http://www.apple.com/ios/whats-new/
-
I've set up an album in iPhotos; when I click on the slideshow it begins with the last photo. How do I get to run from the 1st photo like it use to?
If you're referring to the iPhoto application on a Mac then read Léonie's post in this topic and see if it might apply to your situation: iPhoto slideshow shown in reverse order: Apple Support Communities
Happy New Year -
HT201365 how to turn off programs running in the background.
How to turn off programs running in the background withiOS7?
I would just add that it is not necessary. The programs referred to are only the recently used programs, and are not "running in the background" with the sometimes exception of GPS apps and music apps. They are simply dormant in the memory. The operating system will remove these programs if the space is required.
-
How do I show applications running in the background? And how do I close them down? In class, the instructor press something but she did not go into Settings. Does anyone know?
Double-click the home button that will bring up all the applications in the background.
To close then you swipe the application upward and it will close. -
HT4528 How do you close programs running in the background after you update to the ios7?
How do you close programs running in the background after you update to the ios7? It no longer works to tap the button twice
double tap the home button, and swiipe upp on the app screenshot
-
On this new ios7 update how do I kill apps running in the background now? I used to be able to double tap the home button
Double tap the home button. Slide the preview window upward. You can do 2 at a time.
It's rarely useful or necessary to do this. Very few apps actually "run in the background" (such as audio streaming and navigation apps). The vast majority are frozen and consume no resources. The iOS manages memory for you to optimize running apps.
iOS: Understanding multitasking
Message was edited by: modular747 -
Please tell me how to shut down apps running in the background with ios7
Shut down apps
1. Double tap the home button to bring up the multi-tasking view
2. Swipe the app's windows upwards to close
3. The app will fly off the screen
Maybe you are looking for
-
Error when adding EPA file to transport request via CTS
I have a rather strange problem. Sometimes when attempting to add an EPA file to a Transport Request via CTS I get the following error in my logs with a corresponding short dump. This does not happen all the time. #000255D36E8F005B00015391000003DC0
-
TM error after logic board replaced
hey guys, I've got a strange one. I had to have my logic board replaced in my Macbook Pro due to a nVidia graphics card dying. Time Machine was working like a champ before I dropped it off. When I got it back I got a TM error and it doesn't want to b
-
Pointer to Automatically assign db logon to DC, DF, BE, BV or LOV
The topic that this pointer links to has now been marked as ANSWERED Hello This is a link to a topic posted in another Business Objects forum I would appreciate input from anyone who can help, thanks Here is the link: Automatically assign db logon to
-
hi, i'm in need to merge two XML files from my java code please help me as soon......
-
After Effects very slow - would love some help
Ok, Here is my system : Vista 64 Ult. Q6600 P5Q-E 8 gig of RAM Geforce GSO 9600 I am working with a project that is 1500 X 1050 (approx) - it contains some camera moves and some page peel effects on pictures - and it is running unbearably slow... I h