Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Arrrg! Permissions driving me nuts in PHP



> mkdir($dirPath,0777);
>
> $dirPath is, well, the name of the directory and the full path name.
> That part seems to be working because the directory is placed in the
> right location.
>
> The PHP manual says that the default permission setting is 0777 anyway,
> but I put it in there explicitly after I started seeing permission problems.
>
> This is the permissions of the directory that won't let itself be deleted:
>
> drwxr-xr-x 3 nobody nobody 4096 Nov 24 04:21 backup_20101124_-_042108

Well, clearly it's not working because it make the directory 755, not
777. I seem to recall having problems with php and directory modes
before. I think I got around it by explicitly changing the mode after
the directory was created.

That all being said, assuming your web server is running as user
nobody, it should still have the right to remove the directory after
it created it. Especially seeing as it's running inside the same
script.

You are not using apache with suexec are you? And just to clarify,
this is being run from the web browser right? You are not using the
cli version of php?

Cheers,
Sach


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links