Connecting Tech Pros Worldwide Forums | Help | Site Map

changing permissions

\@
Guest
 
Posts: n/a
#1: Nov 22 '05
Problem is something like this. Some web applications written in php
change permissions of some files and directories so I can't remove them
if I don't change permissions to write those files and dir's. I can do
that by making a php file with code :

<?php
chmod ("dir-or-file", 0777);
?>

and send it to server and point browser to that file.After that I can
remove the file or directory but the problem is: sometimes there are
ten's maybe hundred's of files to change and remove.It take's a lifetime
to change permissions one by one so what is the code to change
permissions recursively to all subdirectories and files.

I hope my english is understandable :)

Mika Suomi
mika(a)villafinn.net

John McClumpha
Guest
 
Posts: n/a
#2: Nov 22 '05

re: changing permissions


On Sun, 20 Nov 2005 08:21:28 GMT, \"@ <""mika(\"@)villafinn.net">
wrote:
[color=blue]
>Problem is something like this. Some web applications written in php
>change permissions of some files and directories so I can't remove them
>if I don't change permissions to write those files and dir's. I can do
>that by making a php file with code :
>
><?php
>chmod ("dir-or-file", 0777);
>?>
>
>and send it to server and point browser to that file.After that I can
>remove the file or directory but the problem is: sometimes there are
>ten's maybe hundred's of files to change and remove.It take's a lifetime
>to change permissions one by one so what is the code to change
>permissions recursively to all subdirectories and files.[/color]

not sure if it will work via PHP - but you can recursively chmod from
a *nix shell using the -R switch...

e.g. chmod -R 777 dir-or-file

not sure - perhaps a similar thing can be done?

--
John McClumpha
Darkness Reigns - http://www.incitegraphics.com.au/darkness/
\@
Guest
 
Posts: n/a
#3: Nov 22 '05

re: changing permissions


> not sure if it will work via PHP - but you can recursively chmod from[color=blue]
> a *nix shell using the -R switch...
>
> e.g. chmod -R 777 dir-or-file
>
> not sure - perhaps a similar thing can be done?
>
> --
> John McClumpha
> Darkness Reigns - http://www.incitegraphics.com.au/darkness/[/color]


That can't be done by me because I don't have rights to do that, but
when it's done by server when I'm pointing browser to php file it works.
And I have tried to use -R option with php but maybe I didn't write the
code right... I don't know

Mika Suomi
mika(a)villafinn.net
Closed Thread