Permissions Issue when creating a new Directory

One for the PHP Linux Gurus

I have a folder that is owned by the user XXXXX
Inside this we create new folders based on a Database Unique ID eg. 4433
We use PHP ... mkdir("4433",777)
Then files from elsewhere are copied to this directory

The problem is that when 4433 is created the Folder is owned by 99 which I am to believe is Nobody

how can I stop this happeneing?

This has only just started happening in the last 2 weeks.

HELP... this is causing major Production Issues
lawsoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
what user runs the php program?
did you mean mkdir("4433",0777)

0
lawsoAuthor Commented:
Thats a good question.

Ther user that runs the PHP program should be XXXXX but now that you mention it I should ask the Hosting Company.

If I run this from the web browser what would the owner be?
Anonymous?
0
lawsoAuthor Commented:
And sorry yes I meant mkdir("4433",0777)
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

hieloCommented:
I suggest you try instead setting the permissions of the directory with the chmod command from within the script.
The PHP's chmod man page includes several examples of how to do this:
http://www.php.net/chmod
0
lawsoAuthor Commented:
OK I have worked out that this is not a security problem it is actually the fact that ImageMajick wasn't installed.

This is now installed... and it is still not working.

Do any of you guys have any experience with ImageMajick?

Scenario:
The original file XXX.JPG is written successfully to a directory and then ImageMajick is run to create several versions of the file. in different directories. Say /thumbnails/XXX.jpg etc

This is not happening and I don't know why.

This all worked on one server an is now not working on anothe supposedly identical server.
Any Ideas?

If it sounds like I am rambling it is because it is driving me crazy. This is the last problem in a long list of problems of moving server for a very popular web site... well at least where I live
0
lawsoAuthor Commented:
PLEASE CLOSE THIS QUESTION.

THe problem turned out to be that the Root Directory Structure for the Web App had changed and was not picking up the correct directory structure.

This happened moveing from a Shared Hosting environment to a Dedciated one
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.