FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


php mkdir issue





kv
When I

mkdir(<dirname>, 755)

it creates directory with 341 permission (as seen from cpanel). I can't do any operations on these directories from cpanel. These dirs are not even created as part of backups.

Am I doing something wrong? Or is it a settings problem? Please help me.
Bondings
I guess the files aren't created in your name and thus you can't change them anymore. Why don't you create the directories in your cpanel or with ftp?
kv
I can't. Because these directories are part of photo album and are created when user creates an album. It is created in php code.

But it used to work earlier. I don't know what happened all of a sudden.

I checked it. The directories are being created as "nobody". Earlier, it used to be created as "kv". Please help.
kv
move_uploaded_file() also failing because of permission issue. Looks like the apache process is running as a different user than cpanel user. I am not even able to upload photoes into album. Please helllppp!!
Bondings
If I make a cron job that puts them back to your username once daily, would that be a solution?
kv
Bondings wrote:
If I make a cron job that puts them back to your username once daily, would that be a solution?


No, it will not.

My website allows users to create albums and upload photos. It used to work fine earlier and all the directories and photos were created as "kv". Now looks like something is wrong. Looks like my php scripts are running as "nobody". It can't create any directories or upload files. Can you please check the user of the webserver process?

EDIT

I have given 777 permissions for my directory and it is working now. But this is not a good solution as these directories are open for write for entire world.
Bondings
kv wrote:
I have given 777 permissions for my directory and it is working now. But this is not a good solution as these directories are open for write for entire world.

It's only the server, but still not very secure.
Related topics
PHP: Sessions and Cookies
PHP DB Error: syntax error
Latest PHP install may cause phpBB to return errors...
cpanel q: Doesn't seem to be a firewall issue
php include path
PHP upgrade?
[php] can't display rss feeds using rss2html.php
PHP issue
php upload issue
Question about a Fill out form.
PHP Sessions Issue
PHP mkdir permission denied
PHP IP tracking script ?
PHP directory issue
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.