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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:18:15+00:00 2026-05-20T14:18:15+00:00

I have a script (run as a cron) that creates a new folder called

  • 0

I have a script (run as a cron) that creates a new folder called images on a server and moves images from the root folder to this new folder. Later another function will create thumbnails from these images and places these into another new folder named thumbs inside that same folder.

However, this function will only work if the parenting images folder has the owner set to 99 for some strange reason. The folder gets the user as its default owner.

How can I get the script to create a folder with the owner set to 99? Or what could be the reason that the PHP script has no power of chmod-ing files that have the user as the owner?

  • 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-05-20T14:18:16+00:00Added an answer on May 20, 2026 at 2:18 pm

    Apparently it depends on how the php script was run in the cronjob to determine which owner will be set as the default on newly created files.

    First I used:

    /usr/local/bin/php /home/username/public_html/script.php > /home/username/public_html/file.xml 2>&1
    

    But this created new folders with the owner set to the ‘username’.

    Instead using curl:

    /usr/bin/curl -s http://domain.com/script.php > /home/username/public_html/file.xml 2>&1
    

    Allowed the new files/folders to be created with the owner set to nobody (UID 99) which in its turn allowed the next script to create new folders/files inside this folder without a problem.

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

Sidebar

Related Questions

I have a bash backup script run as root (cron) that delegates certain tasks
On my php host, I have a script that is run by a cron
I have a script that is going to be run by via CRON every
I re-image one of my machines regularly; and have a script that I run
I have a script that needs to run after tomcat has finished starting up
I have a script that calls an application that requires user input, e.g. run
I have a java script code that works fine when run through a browser,
I have a Perl script that I'd like to run on Windows, using either
I have a script that runs fine in the browser, however fails when run
I have a script that runs on the command line, called by a crontab.

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.