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 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 script that I'm trying to run from cron. When I run
I have this bash script on the server that runs every hour, via cron.
I have a script that I mean to be run from cron that ensures
I have this script that run to fix my menu bar to the browser
I have wrote a script that was run from a spreadsheet. I had One
I have a shell script that I can run successfully from the command line.
I have two ruby script cron jobs that I'm trying to run under Ubuntu
I have a script residing on my webserver's cron that should run every night.
On my php host, I have a script that is run by a cron
I have a small python script that creates a graph of data pulled from

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.