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

  • Home
  • SEARCH
  • 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 8720713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:05:55+00:00 2026-06-13T07:05:55+00:00

I have to automate a process using php in which I have to append

  • 0

I have to automate a process using php in which I have to append content in a file.
The file does not have any specific permissions specified but the folder ‘abc’ has read only permissions, so fopen() prompts permission denied when I try to append a file.

But I can edit the file manually and also from the command prompt. So I tried the following:

When I try
echo exec(“echo Testing>>\\xx.xx.x.x\C$\abc\test.txt”);
in my script, it does not work.

If the same command
echo Testing>>\xx.xx.x.x\C$\abc\test.txt
is run on cmd it works.

I even tried psexec:-
echo exec(‘C:/psexec \xx.xx.x.x cmd /c \”echo Testing>>C:\abc\test.txt\”‘);
again when i run
C:/psexec \xx.xx.x.x cmd /c “echo Testing>>C:\abc\test.txt”
on cmd it works fine.

Is it anything to do with exec() that I am doing wrong?
OR Is there any other way I can edit file, because I should not change the folder permissions but still get the process automated.

  • 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-13T07:05:56+00:00Added an answer on June 13, 2026 at 7:05 am

    I assume you are using Windows. On Debian Linux, I would tell you to give write permissions to user www-data on the appropriate directory.

    You probably need to give the local IIS worker account write permissions on the directory. The local IIS worker account is likely named something like IUSR_[SERVERNAME].

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

Sidebar

Related Questions

I have written the batch file below, in order to automate the process of
We have a process that I'm trying to automate in which I have to
I have a normal windows forms program (Not VSTO) which deploys using click once.
I am trying to automate my trigger process so that I don't have to
I have to automate a test in which I have to download an excel
On a website I have a number of small PHP scripts to automate changes
I wish to start using MS-Build. I have lots of projects which I build
I have an android application which uses jni and I'm trying to automate build
I'm trying to automate a process on a remote machine using a python script.
I'm using a vdproj to create a .msi file. I have a continuous integration

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.