Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFFILE Upload Linux Folder permission Issue

New Here ,
Sep 10, 2012 Sep 10, 2012

Hey guys!  I'm trying to get my CFFILE upload code to work properly on a linux environment.  Unfortunately, it seems to only work as far as uploading when I set the permissions of the directory to "777".  I really don't want to open it up that much.  Is this something I'm stuck with or is there another way of addressing this issue?  See code below...thanks so much!

<html><head><title>Upload File with Coldfusion</title></head><body>

<cfif isdefined("form.submit_upload")>

<cffile action="UPLOAD" filefield="file_path" destination="#file_dir#" nameconflict="MAKEUNIQUE" mode="777">

<strong><font color="red">File Uploaded!</font></strong>

</cfif>

<form action="index.cfm" method="POST" name="frmupload" enctype="multipart/form-data">

<H4>Upload a File</h4><br>

<h5>Coldfusion upload

<br><br>

Enter file path for upload:<br><br>

<input type="text" name="file_dir"><br><br>

Select file to upload:<br><br>

<input type="file" name="file_path"><br><br>

<input type="submit" name="submit_upload" value="upload">

</form>

</body></html>

587
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 10, 2012 Sep 10, 2012
LATEST

Remember that your CF instance is running as a user.  What rights does that user have to your upload folder?  Perhaps that will shed some light on it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources