Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9151641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:51:08+00:00 2026-06-17T11:51:08+00:00

I have a file sharing website in the making where I am allowing the

  • 0

I have a file sharing website in the making where I am allowing the visual and function part of pages work. This runs into a problem when I want to allow server side scripting like php pages to be uploaded. This php (etc.) page could easily back link and delete files which I obviously would not want. I have changed the permissions many times to test but this also stops my php files from uploading and renaming files to these folders. I do want to allow these file types but im not sure what I can do.

I was thinking I could do this through .htaccess but I wouldn’t know how.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:51:09+00:00Added an answer on June 17, 2026 at 11:51 am

    If I understand correctly from reading comments:

    You want users to be able to upload any file. Including code. Including .php, .asp etc.
    You want the users to be able to execute this code, but to limit the code to a “sandbox” environment.

    Seems to me you should write your files to a specific location, which has its own document root/vhost (http://exec.domain.tld).

    On that vhost you could set security, ie:

    AllowOverride None # disable rewriting and such
    php value disable_functions dl,exec,passthru,system,shell_exec,popen # disable functions
    

    And to top it off (!important) set basedir restrictions to the vhosts document root

    <Directory /srv/www/exec.domain.tld/docroot>
      php_admin_value open_basedir /srv/www/exec.domain.tld/docroot 
    </Directory>
    

    I haven’t actually set up this environment, but I feel this is your best starting point. And I do think it’ll work, if you fix the typo’s/parameter name errors i might have made 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem, i have a file who opened other process and this
I built a website and I have this png file which is a bordered
I have to make a peer to peer file sharing app on android platform
Suppose that we have file like this: sometext11 sometext12 sometext13 sometext21 sometext22 sometext23 Texts
Suppose I have file which goes like this : a void measure() { a
I have file sharing via iTunes working in my application (reference What's New in
I have a file-sharing site where my users are interested in clicks on their
OK I have so much questions regarding my file sharing application that I don't
I have Windows File sharing enabled on an OS X 10.4 computer. It's accessible
In APUE section 8.3 fork function , about file sharing between parent and child

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.