How come folders/viles created via PHP script act different from those dragged in?
I am trying to create a sort of file manager using php.
Instead of using a Database, i am creating a tree structure of files
Each subfolder's name is a header and its files are files available for download.
At the top level of the tree is an index.php page that can add subfolders
i can create directories("headers") with php makedir
and i can remove directories with rmdir
but when i try to drag a folder via filesystem into the tree structure..
while on the index.php page, it displays as it should. showing the new folder and files inside...
when i try to delete it with the php script...
it says "Operation not permitted "
when i go to the linux machine and type
ls -la
i get that
the php created folders have a "wwwrun"/"nogroup "
where as the folder i drag in is "nobody"/ "nobody"
is it possilbe through the php to change the latter into the former so that I can manage it that way?
i have found in my search somewhere where someone says.. they use a cron job running every x minutes that could do that...
that could be an option.. but id rather do it this way first... if possible.
changing any new folders in the tree to the correct owner/group settings at run tiime.
anyone know?
|