We need to have some user files normally readable but writable only through a program (html textarea).
For example the permissions of the files could be 400 or 444 but this program needs to set it to 600 or 660 or 666 (whatever) for the duration of the program which is run by the user.
What's the most convenient way of doing this? (Probably using PHP?)
Thank you for your help.
First of all don't make it world writable unless you want to face the security issues that poses. If you are running php then that script will be run by the web server, so give the web server user (apache?) write permissions, either by making it the owner of the file or by belonging to the group.
Second make sure that you properly validate the data before writing it to the file.
Excellent. Thank you.
|All times are GMT -5. The time now is 04:54 PM.|