I need to grant write permission to temporary folder of all local machine (if it does not have)which access my php site. Is it possible using PHP?
+1
A:
You can use the php function chmod. You want to be careful of course but you could say
chmod('/path/to/my/folder',777);
Or whatever write permissions you want.
jnunn
2010-05-20 13:00:25
This won't work.
Josh K
2010-05-20 13:03:38
Well, it works, but not for the task described in this question (grant folder permissions on *client* machine).
Jørn Schou-Rode
2010-05-20 13:04:49
Which means it won't work *in this context* and is a *wrong answer*.
Josh K
2010-05-20 13:05:23
I assumed by local machine he's talking his machine.
jnunn
2010-05-20 13:06:17
+4
A:
No, you can't because PHP works server-side only! PHP is used to create HTML output and cannot access files on client-side machines.
chmod('path/to/my/folder',777); will only change file permissions on the server machine - never on a client!
Thariama
2010-05-20 13:02:30
-0 since he obviously understands the client/server side problem and is talking about localhosts which run his script, yet the command in your answer is fine.
Mikulas Dite
2010-05-20 13:13:29
well, i assume that he is talking about clients accessing his website because he asks for "all local machine ... which access my php site".
Thariama
2010-05-20 13:26:12