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 8359795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:15:46+00:00 2026-06-09T11:15:46+00:00

A wont work problem. I have a XHR file upload to a directory. There

  • 0

A wont work problem.

I have a XHR file upload to a directory. There is a button the user presses on the site which executes php code. On that code I placed the function chmod($file_name, 0777);. Never mind the security issues, but this is not working. I’m baffled.

<?php
$file_name = $_REQUEST["file_name"];
chmod($file_name, 0777);
?>

The javascript sends the file name and I echo’ed the variable for the correct value. Thats not the problem.

$("#csv_dedupe").live("click", function(e) {
    file_name = 'http://hidden/files/' + $("#IMEXp_import_var-uploadFile-file").val();
    $.post($_CFG_PROCESSORFILE, {"task": "csv_dupe", "file_name": file_name}, function(data) {
        alert(data);
    }, "json")
});

I tried other solutions like changing the umask in my /etc/profile and my /etc/bashrc and rebooting, but it did not work. The reason I tried these is because ultimately I just want to change the directory’s default chmod.

I am running on a virtual centos server. Its LAMP. What am I doing wrong?

  • 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-09T11:15:50+00:00Added an answer on June 9, 2026 at 11:15 am

    You’re using a decimal literal instead of an octal literal.

    chmod($file_name, 0777);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple JavaScript/jquery code which won't just work correctly. The problem
So my problem is that fancybox wont work till 2nd click :/ i have
the biggest problem I have is understanding why some of my code wont work
I have no idea why this wont work but I have tried the following:
Referencing this question: System.Reflection.Assembly.LoadFile Locks File System.IO.File.ReadAllBytes(path) wont work since it's not a standalone
i have some huge js files and there are some texts/messages/... which are output
I have a nice java code that unzips a .zip file. But problem with
i have a problem with my server which is running ubuntu (debian) linux and
I have a problem with a site I am redesigning and the problem is
strtok wont work correctly when using char *str as the first parameter (not the

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.